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
ConstructorDescriptionHierarchicalQuery
(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, T parent) Constructs a new hierarchical query object with given filter and parent node. -
Method Summary
Modifier and TypeMethodDescriptionGet the hierarchical parent object, wherenull
corresponds 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 benull
parent
- the hierarchical parent object,null
corresponding 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 benull
parent
- the hierarchical parent object,null
corresponding to the root node
-
-
Method Details
-
getParent
Get the hierarchical parent object, wherenull
corresponds 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:
-