Package com.vaadin.data.provider
Class AbstractBackEndHierarchicalDataProvider<T,F>
- java.lang.Object
-
- com.vaadin.data.provider.AbstractDataProvider<T,F>
-
- com.vaadin.data.provider.AbstractHierarchicalDataProvider<T,F>
-
- com.vaadin.data.provider.AbstractBackEndHierarchicalDataProvider<T,F>
-
- Type Parameters:
T- data typeF- filter type
- All Implemented Interfaces:
BackEndDataProvider<T,F>,BackEndHierarchicalDataProvider<T,F>,DataProvider<T,F>,HierarchicalDataProvider<T,F>,Serializable
public abstract class AbstractBackEndHierarchicalDataProvider<T,F> extends AbstractHierarchicalDataProvider<T,F> implements BackEndHierarchicalDataProvider<T,F>
Abstract base class for implementingBackEndHierarchicalDataProviders.- Since:
- 8.1
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractBackEndHierarchicalDataProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Stream<T>fetchChildren(HierarchicalQuery<T,F> query)Fetches data from this HierarchicalDataProvider using givenquery.protected abstract Stream<T>fetchChildrenFromBackEnd(HierarchicalQuery<T,F> query)Fetches data from the back end using the given query.booleanisInMemory()Gets whether the DataProvider content all available in memory or does it use some external backend.voidsetSortOrders(List<QuerySortOrder> sortOrders)Sets a list of sort orders to use as the default sorting for this data provider.-
Methods inherited from class com.vaadin.data.provider.AbstractDataProvider
addDataProviderListener, addListener, fireEvent, refreshAll, refreshItem
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.data.provider.BackEndDataProvider
setSortOrder, setSortOrders
-
Methods inherited from interface com.vaadin.data.provider.DataProvider
addDataProviderListener, getId, refreshAll, refreshItem, withConfigurableFilter, withConfigurableFilter, withConvertedFilter
-
Methods inherited from interface com.vaadin.data.provider.HierarchicalDataProvider
fetch, getChildCount, hasChildren, size
-
-
-
-
Method Detail
-
fetchChildren
public Stream<T> fetchChildren(HierarchicalQuery<T,F> query)
Description copied from interface:HierarchicalDataProviderFetches data from this HierarchicalDataProvider using givenquery. Only the immediate children ofHierarchicalQuery.getParent()will be returned.NOTE: If your data request is likely to involve I/O channels, see
DataProvider.fetch(Query)for instructions on how to handle the stream without risking resource leaks.- Specified by:
fetchChildrenin interfaceHierarchicalDataProvider<T,F>- Parameters:
query- given query to request data with- Returns:
- a stream of data objects resulting from the query
-
isInMemory
public boolean isInMemory()
Description copied from interface:DataProviderGets whether the DataProvider content all available in memory or does it use some external backend.- Specified by:
isInMemoryin interfaceBackEndDataProvider<T,F>- Specified by:
isInMemoryin interfaceDataProvider<T,F>- Returns:
trueif all data is in memory;falseif not
-
setSortOrders
public void setSortOrders(List<QuerySortOrder> sortOrders)
Description copied from interface:BackEndDataProviderSets a list of sort orders to use as the default sorting for this data provider. This overrides the sorting set by any other method that manipulates the default sorting of this data provider.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.
- Specified by:
setSortOrdersin interfaceBackEndDataProvider<T,F>- Parameters:
sortOrders- a list of sort orders to set, notnull- See Also:
BackEndDataProvider.setSortOrder(QuerySortOrder)
-
fetchChildrenFromBackEnd
protected abstract Stream<T> fetchChildrenFromBackEnd(HierarchicalQuery<T,F> query)
Fetches data from the back end using the given query.- Parameters:
query- the query that defines sorting, filtering, paging and the parent item to fetch children from- Returns:
- a stream of items matching the query
- See Also:
HierarchicalQuery
-
-