com.vaadin.flow.data.provider.hierarchy.
Class HierarchicalQuery<T,F>
Type Parameters:
T
- bean type
F
- filter type
All Implemented Interfaces:
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, 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, where
null
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, where
null
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 OptionalSee Also:
-