Class HierarchicalQuery<T,F>
java.lang.Object
com.vaadin.flow.data.provider.Query<T,F>
com.vaadin.flow.data.provider.hierarchy.HierarchicalQuery<T,F>
- Type Parameters:
T- bean typeF- filter type
- All Implemented Interfaces:
Serializable
Immutable hierarchical query object used to request data from a backend.
Contains the parent node, index limits, sorting and filtering information.
- Since:
- 1.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHierarchicalQuery(int offset, int limit, List<QuerySortOrder> sortOrders, Comparator<T> inMemorySorting, F filter, Set<Object> expandedItemIds, T parent) Constructs a new hierarchical query object with given offset, limit, sorting, filtering and expanded items.HierarchicalQuery(int offset, int limit, List<QuerySortOrder> sortOrders, Comparator<T> inMemorySorting, F filter, T parent) Constructs a new hierarchical query object with given offset, limit, sorting and filtering.HierarchicalQuery(F filter, Set<Object> expandedItemIds, T parent) Constructs a new hierarchical query object with given filter, expanded items and parent node.HierarchicalQuery(F filter, T parent) Constructs a new hierarchical query object with given filter and parent node. -
Method Summary
Modifier and TypeMethodDescriptionGets the set of item IDs that are currently expanded in the hierarchy.Get the hierarchical parent object, wherenullcorresponds to the root node.Get an Optional of the hierarchical parent object.Methods inherited from class com.vaadin.flow.data.provider.Query
getFilter, getInMemorySorting, getLimit, getOffset, getPage, getPageSize, getRequestedRangeEnd, getSortingComparator, getSortOrders
-
Constructor Details
-
HierarchicalQuery
Constructs a new hierarchical query object with given filter and parent node.- Parameters:
filter- filtering for fetching; can benullparent- the hierarchical parent object,nullcorresponding to the root node
-
HierarchicalQuery
Constructs a new hierarchical query object with given filter, expanded items and parent node.- Parameters:
filter- filtering for fetching; can benullexpandedItemIds- the set of expanded item IDsparent- the hierarchical parent object,nullcorresponding to the root node
-
HierarchicalQuery
public HierarchicalQuery(int offset, int limit, List<QuerySortOrder> sortOrders, Comparator<T> inMemorySorting, F filter, T parent) Constructs a new hierarchical query object with given offset, limit, sorting and filtering.- Parameters:
offset- first index to fetchlimit- fetched item countsortOrders- sorting order for fetching; used for sorting backendsinMemorySorting- comparator for sorting in-memory datafilter- filtering for fetching; can benullparent- the hierarchical parent object,nullcorresponding to the root node
-
HierarchicalQuery
public HierarchicalQuery(int offset, int limit, List<QuerySortOrder> sortOrders, Comparator<T> inMemorySorting, F filter, Set<Object> expandedItemIds, T parent) Constructs a new hierarchical query object with given offset, limit, sorting, filtering and expanded items.- Parameters:
offset- first index to fetchlimit- fetched item countsortOrders- sorting order for fetching; used for sorting backendsinMemorySorting- comparator for sorting in-memory datafilter- filtering for fetching; can benullexpandedItemIds- the set of expanded item IDsparent- the hierarchical parent object,nullcorresponding to the root node
-
-
Method Details
-
getParent
Get the hierarchical parent object, wherenullcorresponds to the root node.- Returns:
- the hierarchical parent object
-
getParentOptional
Get an Optional of the hierarchical parent object.- Returns:
- the result of
getParent()wrapped by an Optional - See Also:
-
getExpandedItemIds
Gets the set of item IDs that are currently expanded in the hierarchy.- Returns:
- the set of expanded item IDs
-