Package com.vaadin.flow.server.data
Class DataCountEndedEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.server.data.AbstractDataCountEvent
com.vaadin.flow.server.data.DataCountEndedEvent
- All Implemented Interfaces:
Serializable
Event fired through the
service event bus
once a count query has returned or thrown, on the thread that issued it.
Fired in reverse listener registration order, so that listeners nest around
the matching DataCountStartedEvent. It is fired whether the query
returned normally or threw, so a listener can clean up its timing state in
one place.
- Since:
- 25.3
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionDataCountEndedEvent(UI ui, Component component, boolean filtered, int count) Creates a new event. -
Method Summary
Modifier and TypeMethodDescriptionintgetCount()Gets the number of items the data provider reported.Methods inherited from class com.vaadin.flow.server.data.AbstractDataCountEvent
getComponent, getSource, getUI, isFilteredMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
DataCountEndedEvent
Creates a new event.- Parameters:
ui- the UI the counting component belongs to, notnullcomponent- the component whose data is being counted, ornullif it could not be resolvedfiltered- whether a filter was set on the querycount- the number of items the data provider reported, or-1if the query threw, in which case aDataCountFailedEventcarrying the throwable was fired first
-
-
Method Details
-
getCount
public int getCount()Gets the number of items the data provider reported.- Returns:
- the count, or
-1if the query threw
-