com.vaadin.flow.component.virtuallist.paging.
Class PagelessDataCommunicator<T>
- java.lang.Object
-
- com.vaadin.flow.data.provider.DataCommunicator<T>
-
- com.vaadin.flow.component.virtuallist.paging.PagelessDataCommunicator<T>
-
Type Parameters:
T
- item typeAll Implemented Interfaces:
public class PagelessDataCommunicator<T> extends DataCommunicator<T>
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
-
-
Constructor Summary
Constructors Constructor Description PagelessDataCommunicator(DataGenerator<T> dataGenerator, ArrayUpdater arrayUpdater, SerializableConsumer<elemental.json.JsonArray> dataUpdater, StateNode stateNode)
-
Method Summary
All Methods Modifier and Type Method Description boolean
isPagingEnabled()
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, confirmUpdate, enablePushUpdates, fetchFromProvider, getBackEndSorting, getDataProvider, getDataProviderSize, getFilter, getInMemorySorting, getItem, getItemCount, getItemCountEstimate, getItemCountEstimateIncrease, getKeyMapper, getPageSize, handleDataRefreshEvent, isDefinedSize, isFetchEnabled, isItemActive, refresh, reset, setBackEndSorting, setCountCallback, setDataProvider, setDataProvider, setDefinedSize, setFetchEnabled, setInMemorySorting, setItemCountEstimate, setItemCountEstimateIncrease, setKeyMapper, setRequestedRange
-
-
-
-
Constructor Detail
-
PagelessDataCommunicator
public PagelessDataCommunicator(DataGenerator<T> dataGenerator, ArrayUpdater arrayUpdater, SerializableConsumer<elemental.json.JsonArray> dataUpdater, StateNode stateNode)
-
-
Method Detail
-
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:
-
-