com.vaadin.flow.component.virtuallist.paging.
Class PagelessDataCommunicator<T>
Type Parameters:
T
- item type
All Implemented Interfaces:
DataCommunicator implementation which disables the paging and does not allow the user to set up the page for VirtualList.
See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.data.provider.DataCommunicator
DataCommunicator.EmptyDataProvider<T1>, DataCommunicator.Filter<F>
-
Field Summary
Fields inherited from class com.vaadin.flow.data.provider.DataCommunicator
DEFAULT_PAGE_INCREASE_COUNT, passivatedByUpdate
-
Constructor Summary
ConstructorsConstructorDescriptionPagelessDataCommunicator
(DataGenerator<T> dataGenerator, ArrayUpdater arrayUpdater, SerializableConsumer<elemental.json.JsonArray> dataUpdater, StateNode stateNode) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether paged queries are enabled or not.
void
setPageSize
(int pageSize) Sets the page size that is used to fetch items.
void
setPagingEnabled
(boolean pagingEnabled) Sets whether paged queries or offset/limit queries will be used.
Methods inherited from class com.vaadin.flow.data.provider.DataCommunicator
buildQuery, computeRequestedRange, confirmUpdate, doUnregister, enablePushUpdates, fetchFromProvider, getBackEndSorting, getDataProvider, getDataProviderSize, getFilter, getInMemorySorting, getItem, getItemCount, getItemCountEstimate, getItemCountEstimateIncrease, getKeyMapper, getPageSize, getPassivatedKeys, handleDataRefreshEvent, isDefinedSize, isFetchEnabled, isItemActive, refresh, reset, setBackEndSorting, setCountCallback, setDataProvider, setDataProvider, setDefinedSize, setFetchEnabled, setInMemorySorting, setItemCountEstimate, setItemCountEstimateIncrease, setKeyMapper, setRequestedRange
-
Constructor Details
-
PagelessDataCommunicator
public PagelessDataCommunicator(DataGenerator<T> dataGenerator, ArrayUpdater arrayUpdater, SerializableConsumer<elemental.json.JsonArray> dataUpdater, StateNode stateNode)
-
-
Method Details
-
setPageSize
public void setPageSize(int pageSize) Description copied from class:
DataCommunicator
Sets the page size that is used to fetch items. The queries to data provider are a multiple of the page size.
Overrides:
setPageSize
in classDataCommunicator<T>
Parameters:
pageSize
- the page size to set -
setPagingEnabled
public void setPagingEnabled(boolean pagingEnabled) Description copied from class:
DataCommunicator
Sets whether paged queries or offset/limit queries will be used.
Overrides:
setPagingEnabled
in classDataCommunicator<T>
Parameters:
pagingEnabled
-true
for paged queries,false
for offset/limit queries -
isPagingEnabled
public boolean isPagingEnabled()Description copied from class:
DataCommunicator
Returns whether paged queries are enabled or not.
When the paged queries are supported, the
Query.getPage()
andQuery.getPageSize()
can be used to fetch items from the paged repositories. Otherwise, one should useQuery.getOffset()
andQuery.getLimit()
. Paged queries are enabled by default.Overrides:
isPagingEnabled
in classDataCommunicator<T>
Returns:
true
for paged queries,false
for offset/limit queriesSee Also:
-