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:
  • 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 supplier
      component - the Table
  • Method Details

    • setItemCountFromDataProvider

      public void setItemCountFromDataProvider()
      Specified by:
      setItemCountFromDataProvider in interface com.vaadin.flow.data.provider.LazyDataView<T>
    • setItemCountEstimate

      public void setItemCountEstimate(int itemCountEstimate)
      Specified by:
      setItemCountEstimate in interface com.vaadin.flow.data.provider.LazyDataView<T>
    • setItemCountUnknown

      public void setItemCountUnknown()
      Specified by:
      setItemCountUnknown in interface com.vaadin.flow.data.provider.LazyDataView<T>
    • getItem

      public T getItem(int index)
      Specified by:
      getItem in interface com.vaadin.flow.data.provider.DataView<T>
    • getSupportedDataProviderType

      protected Class<?> getSupportedDataProviderType()
      Specified by:
      getSupportedDataProviderType in class com.vaadin.flow.data.provider.AbstractDataView<T>
    • getItemCountEstimate

      public int getItemCountEstimate()
      Specified by:
      getItemCountEstimate in interface com.vaadin.flow.data.provider.LazyDataView<T>
    • setItemCountEstimateIncrease

      public void setItemCountEstimateIncrease(int itemCountEstimateIncrease)
      Specified by:
      setItemCountEstimateIncrease in interface com.vaadin.flow.data.provider.LazyDataView<T>
    • getItemCountEstimateIncrease

      public int getItemCountEstimateIncrease()
      Specified by:
      getItemCountEstimateIncrease in interface com.vaadin.flow.data.provider.LazyDataView<T>
    • setItemIndexProvider

      public void setItemIndexProvider(com.vaadin.flow.data.provider.ItemIndexProvider<T,?> itemIndexProvider)
      Specified by:
      setItemIndexProvider in interface com.vaadin.flow.data.provider.LazyDataView<T>
    • getItemIndexProvider

      protected com.vaadin.flow.data.provider.ItemIndexProvider<T,?> getItemIndexProvider()
      Gets the item index provider for this data view's component.
      Returns:
      the item index provider. May be null.
    • getItemIndex

      public Optional<Integer> getItemIndex(T item)
      Gets the index of the given item by the item index provider set with setItemIndexProvider(ItemIndexProvider).
      Specified by:
      getItemIndex in interface com.vaadin.flow.data.provider.DataView<T>
      Overrides:
      getItemIndex in class com.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 with setItemIndexProvider(ItemIndexProvider)
    • getPageIndex

      public Optional<Integer> getPageIndex(T item)
      Gets the page index of the given item by the item index provider set with setItemIndexProvider(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 with setItemIndexProvider(ItemIndexProvider)