Package org.vaadin.tatu
Class BeanTableLazyDataView<T>
java.lang.Object
com.vaadin.flow.data.provider.AbstractDataView<T>
org.vaadin.tatu.BeanTableLazyDataView<T>
- All Implemented Interfaces:
com.vaadin.flow.data.provider.DataView<T>,com.vaadin.flow.data.provider.LazyDataView<T>,Serializable
public class BeanTableLazyDataView<T>
extends com.vaadin.flow.data.provider.AbstractDataView<T>
implements com.vaadin.flow.data.provider.LazyDataView<T>
- See Also:
-
Field Summary
Fields inherited from class com.vaadin.flow.data.provider.AbstractDataView
component, dataProviderSupplier, NULL_IDENTIFIER_ERROR_MESSAGE, NULL_ITEM_ERROR_MESSAGE -
Constructor Summary
ConstructorsConstructorDescriptionBeanTableLazyDataView(com.vaadin.flow.function.SerializableSupplier<? extends com.vaadin.flow.data.provider.DataProvider<T, ?>> dataProviderSupplier, BeanTable<T> component) Creates a new lazy data view for grid and verifies the passed data provider is compatible with this data view implementation. -
Method Summary
Modifier and TypeMethodDescriptiongetItem(int index) intintgetItemIndex(T item) Gets the index of the given item by the item index provider set withsetItemIndexProvider(ItemIndexProvider).protected com.vaadin.flow.data.provider.ItemIndexProvider<T, ?> Gets the item index provider for this data view's component.getPageIndex(T item) Gets the page index of the given item by the item index provider set withsetItemIndexProvider(ItemIndexProvider).protected Class<?> voidsetItemCountEstimate(int itemCountEstimate) voidsetItemCountEstimateIncrease(int itemCountEstimateIncrease) voidvoidvoidsetItemIndexProvider(com.vaadin.flow.data.provider.ItemIndexProvider<T, ?> itemIndexProvider) Methods inherited from class com.vaadin.flow.data.provider.AbstractDataView
addIdentifierProviderChangeListener, addItemCountChangeListener, equals, getIdentifierProvider, getItemIndex, getItems, refreshAll, refreshItem, setIdentifierProvider, verifyDataProviderType, verifyDataProviderTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.data.provider.DataView
addItemCountChangeListener, getItems, refreshAll, refreshItem, setIdentifierProvider
-
Constructor Details
-
BeanTableLazyDataView
public BeanTableLazyDataView(com.vaadin.flow.function.SerializableSupplier<? extends com.vaadin.flow.data.provider.DataProvider<T, ?>> dataProviderSupplier, BeanTable<T> component) Creates a new lazy data view for grid and verifies the passed data provider is compatible with this data view implementation.- Parameters:
dataProviderSupplier- data provider suppliercomponent- the Table
-
-
Method Details
-
setItemCountFromDataProvider
public void setItemCountFromDataProvider()- Specified by:
setItemCountFromDataProviderin interfacecom.vaadin.flow.data.provider.LazyDataView<T>
-
setItemCountEstimate
public void setItemCountEstimate(int itemCountEstimate) - Specified by:
setItemCountEstimatein interfacecom.vaadin.flow.data.provider.LazyDataView<T>
-
setItemCountUnknown
public void setItemCountUnknown()- Specified by:
setItemCountUnknownin interfacecom.vaadin.flow.data.provider.LazyDataView<T>
-
getItem
- Specified by:
getItemin interfacecom.vaadin.flow.data.provider.DataView<T>
-
getSupportedDataProviderType
- Specified by:
getSupportedDataProviderTypein classcom.vaadin.flow.data.provider.AbstractDataView<T>
-
getItemCountEstimate
public int getItemCountEstimate()- Specified by:
getItemCountEstimatein interfacecom.vaadin.flow.data.provider.LazyDataView<T>
-
setItemCountEstimateIncrease
public void setItemCountEstimateIncrease(int itemCountEstimateIncrease) - Specified by:
setItemCountEstimateIncreasein interfacecom.vaadin.flow.data.provider.LazyDataView<T>
-
getItemCountEstimateIncrease
public int getItemCountEstimateIncrease()- Specified by:
getItemCountEstimateIncreasein interfacecom.vaadin.flow.data.provider.LazyDataView<T>
-
setItemIndexProvider
public void setItemIndexProvider(com.vaadin.flow.data.provider.ItemIndexProvider<T, ?> itemIndexProvider) - Specified by:
setItemIndexProviderin interfacecom.vaadin.flow.data.provider.LazyDataView<T>
-
getItemIndexProvider
Gets the item index provider for this data view's component.- Returns:
- the item index provider. May be null.
-
getItemIndex
Gets the index of the given item by the item index provider set withsetItemIndexProvider(ItemIndexProvider).- Specified by:
getItemIndexin interfacecom.vaadin.flow.data.provider.DataView<T>- Overrides:
getItemIndexin classcom.vaadin.flow.data.provider.AbstractDataView<T>- Parameters:
item- item to get index for- Returns:
- index of the item or null if the item is not found
- Throws:
UnsupportedOperationException- if the item index provider is not set withsetItemIndexProvider(ItemIndexProvider)
-
getPageIndex
Gets the page index of the given item by the item index provider set withsetItemIndexProvider(ItemIndexProvider).- Parameters:
item- item to get page index for- Returns:
- page index of the item or null if the item is not found
- Throws:
UnsupportedOperationException- if the item index provider is not set withsetItemIndexProvider(ItemIndexProvider)
-