T
- data typeF
- filter typepublic abstract class AbstractBackEndHierarchicalDataProvider<T,F> extends AbstractHierarchicalDataProvider<T,F> implements BackEndHierarchicalDataProvider<T,F>
BackEndHierarchicalDataProvider
s.Constructor and Description |
---|
AbstractBackEndHierarchicalDataProvider() |
Modifier and Type | Method and Description |
---|---|
Stream<T> |
fetchChildren(HierarchicalQuery<T,F> query)
Fetches data from this HierarchicalDataProvider using given
query . |
protected abstract Stream<T> |
fetchChildrenFromBackEnd(HierarchicalQuery<T,F> query)
Fetches data from the back end using the given query.
|
boolean |
isInMemory()
Gets whether the DataProvider content all available in memory or does it
use some external backend.
|
void |
setSortOrders(List<QuerySortOrder> sortOrders)
Sets a list of sort orders to use as the default sorting for this data
provider.
|
withConfigurableFilter, withConfigurableFilter, withConvertedFilter
addDataProviderListener, addListener, fireEvent, refreshAll, refreshItem
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fetch, getChildCount, hasChildren, size, withConfigurableFilter, withConfigurableFilter, withConvertedFilter
setSortOrder, setSortOrders
addDataProviderListener, fromCallbacks, fromFilteringCallbacks, fromStream, getId, ofCollection, ofItems, refreshAll, refreshItem
public AbstractBackEndHierarchicalDataProvider()
public Stream<T> fetchChildren(HierarchicalQuery<T,F> query)
HierarchicalDataProvider
query
. Only the immediate children of
HierarchicalQuery.getParent()
will be returned.fetchChildren
in interface HierarchicalDataProvider<T,F>
query
- given query to request data withpublic boolean isInMemory()
DataProvider
isInMemory
in interface BackEndDataProvider<T,F>
isInMemory
in interface DataProvider<T,F>
true
if all data is in memory; false
if notpublic void setSortOrders(List<QuerySortOrder> sortOrders)
BackEndDataProvider
The default sorting is used if the query defines no sorting. The default sorting is also used to determine the ordering of items that are considered equal by the sorting defined in the query.
setSortOrders
in interface BackEndDataProvider<T,F>
sortOrders
- a list of sort orders to set, not null
BackEndDataProvider.setSortOrder(QuerySortOrder)
protected abstract Stream<T> fetchChildrenFromBackEnd(HierarchicalQuery<T,F> query)
query
- the query that defines sorting, filtering, paging and the
parent item to fetch children fromHierarchicalQuery
Copyright © 2019. All rights reserved.