T
- data typeF
- filter typepublic interface HierarchicalDataProvider<T,F> extends DataProvider<T,F>
Modifier and Type | Method and Description |
---|---|
default Stream<T> |
fetch(Query<T,F> query)
Fetches data from this HierarchicalDataProvider using given
query . |
Stream<T> |
fetchChildren(HierarchicalQuery<T,F> query)
Fetches data from this HierarchicalDataProvider using given
query . |
int |
getChildCount(HierarchicalQuery<T,F> query)
Get the number of immediate child data items for the parent item returned
by a given query.
|
boolean |
hasChildren(T item)
Check whether a given item has any children associated with it.
|
default int |
size(Query<T,F> query)
Get the number of immediate child data items for the parent item returned
by a given query.
|
addDataProviderListener, fromCallbacks, fromFilteringCallbacks, fromStream, getId, isInMemory, ofCollection, ofItems, refreshAll, refreshItem, withConfigurableFilter, withConfigurableFilter, withConvertedFilter
default int size(Query<T,F> query)
size
in interface DataProvider<T,F>
query
- given query to request the count forHierarchicalQuery.getParent()
IllegalArgumentException
- if the query is not of type HierarchicalQuerydefault Stream<T> fetch(Query<T,F> query)
query
. Only the immediate children of
HierarchicalQuery.getParent()
will be returned.fetch
in interface DataProvider<T,F>
query
- given query to request data withIllegalArgumentException
- if the query is not of type HierarchicalQueryint getChildCount(HierarchicalQuery<T,F> query)
query
- given query to request the count forHierarchicalQuery.getParent()
Stream<T> fetchChildren(HierarchicalQuery<T,F> query)
query
. Only the immediate children of
HierarchicalQuery.getParent()
will be returned.query
- given query to request data withboolean hasChildren(T item)
item
- the item to check for childrenCopyright © 2018 Vaadin Ltd. All rights reserved.