Package com.vaadin.flow.data.provider
Interface CallbackDataProvider.FetchCallback<T,F>
-
- Type Parameters:
T
- the type of the items to fetchF
- the type of the optional filter in the query,Void
if filtering is not supported
- All Superinterfaces:
Serializable
- Enclosing class:
- CallbackDataProvider<T,F>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface CallbackDataProvider.FetchCallback<T,F> extends Serializable
Callback interface for fetching a stream of items from a backend based on a query.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stream<T>
fetch(Query<T,F> query)
Fetches a stream of items based on a query.
-
-
-
Method Detail
-
fetch
Stream<T> fetch(Query<T,F> query)
Fetches a stream of items based on a query. The query defines the paging of the items to fetch throughQuery.getOffset()
andQuery.getLimit()
, the sorting throughQuery.getSortOrders()
and optionally also any filtering to use throughQuery.getFilter()
.- Parameters:
query
- the query that defines which items to fetch- Returns:
- a stream of items
-
-