T - data typepublic class GridListDataView<T> extends AbstractListDataView<T>
component, dataProviderSupplier, NULL_IDENTIFIER_ERROR_MESSAGE| Constructor and Description |
|---|
GridListDataView(DataCommunicator<T> dataCommunicator,
Grid<T> grid,
SerializableBiConsumer<SerializablePredicate<T>,SerializableComparator<T>> filterOrSortingChangedCallback)
Creates a new instance of Grid in-memory data view and verifies the
passed data provider is compatible with this data view implementation.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getItemCount()
Get the full item count with filters if any set.
|
Stream<T> |
getItems()
Get the full data available to the component.
|
void |
setIdentifierProvider(IdentifierProvider<T> identifierProvider)
Sets an identifier provider, which returns an identifier for the given
item.
|
addFilter, addItem, addItemAfter, addItemBefore, addItems, addItemsAfter, addItemsBefore, addSortComparator, addSortOrder, contains, getDataProvider, getItem, getNextItem, getPreviousItem, getSupportedDataProviderType, removeFilters, removeItem, removeItems, removeSorting, setFilter, setSortComparator, setSortOrder, validateItemIndexaddItemCountChangeListener, equals, getIdentifierProvider, refreshAll, refreshItem, verifyDataProviderTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddItemCountChangeListener, refreshAll, refreshItempublic GridListDataView(DataCommunicator<T> dataCommunicator, Grid<T> grid, SerializableBiConsumer<SerializablePredicate<T>,SerializableComparator<T>> filterOrSortingChangedCallback)
dataCommunicator - the data communicator of the Grid, not nullgrid - the Grid component, not nullfilterOrSortingChangedCallback - callback, which is being invoked when the Grid's filtering or
sorting changes, not nullpublic Stream<T> getItems()
DataViewpublic int getItemCount()
ListDataViewDataView.addItemCountChangeListener(ComponentEventListener) method
instead to get notified when the item count has changed.getItemCount in interface ListDataView<T,AbstractListDataView<T>>getItemCount in class AbstractListDataView<T>DataView.addItemCountChangeListener(ComponentEventListener)public void setIdentifierProvider(IdentifierProvider<T> identifierProvider)
DataViewdataView.setIdentifiedProvider(Item::getId);.setIdentifierProvider in interface DataView<T>setIdentifierProvider in class AbstractDataView<T>identifierProvider - function that returns the non-null identifier for a given itemCopyright © 2021. All rights reserved.