Class EmptyDataGridItems<T>

java.lang.Object
com.vaadin.flow.data.provider.AbstractDataProvider<T,Void>
io.jmix.flowui.data.grid.EmptyDataGridItems<T>
All Implemented Interfaces:
com.vaadin.flow.data.provider.DataProvider<T,Void>, DataUnit, EmptyDataUnit, EntityDataUnit, DataGridItems<T>, DataGridItems.Sortable<T>, EntityDataGridItems<T>, HasType<T>, Serializable
Direct Known Subclasses:
EmptyTreeDataGridItems

public class EmptyDataGridItems<T> extends com.vaadin.flow.data.provider.AbstractDataProvider<T,Void> implements EntityDataGridItems<T>, DataGridItems.Sortable<T>, EmptyDataUnit
See Also:
  • Constructor Details

    • EmptyDataGridItems

      public EmptyDataGridItems(MetaClass metaClass)
  • Method Details

    • getItems

      public Collection<T> getItems()
      Specified by:
      getItems in interface DataGridItems<T>
      Returns:
      unmodifiable collection of items
    • isInMemory

      public boolean isInMemory()
      Specified by:
      isInMemory in interface com.vaadin.flow.data.provider.DataProvider<T,Void>
    • size

      public int size(com.vaadin.flow.data.provider.Query<T,Void> query)
      Specified by:
      size in interface com.vaadin.flow.data.provider.DataProvider<T,Void>
    • fetch

      public Stream<T> fetch(com.vaadin.flow.data.provider.Query<T,Void> query)
      Specified by:
      fetch in interface com.vaadin.flow.data.provider.DataProvider<T,Void>
    • getState

      public BindingState getState()
      Specified by:
      getState in interface DataUnit
      Returns:
      a state of this source
    • addStateChangeListener

      public com.vaadin.flow.shared.Registration addStateChangeListener(Consumer<DataUnit.StateChangeEvent> listener)
      Description copied from interface: DataUnit
      Registers a new state change listener.
      Specified by:
      addStateChangeListener in interface DataUnit
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • getEntityMetaClass

      public MetaClass getEntityMetaClass()
      Specified by:
      getEntityMetaClass in interface EntityDataUnit
      Returns:
      MetaClass of an entity contained in the source
    • getType

      public Class<T> getType()
      Specified by:
      getType in interface HasType<T>
      Returns:
      type of value
    • getSelectedItem

      @Nullable public T getSelectedItem()
      Specified by:
      getSelectedItem in interface DataGridItems<T>
      Returns:
      the current item contained in the source
    • setSelectedItem

      public void setSelectedItem(@Nullable T item)
      Description copied from interface: DataGridItems
      Set current item in the source.
      Specified by:
      setSelectedItem in interface DataGridItems<T>
      Parameters:
      item - the item to set
    • addValueChangeListener

      public com.vaadin.flow.shared.Registration addValueChangeListener(Consumer<DataGridItems.ValueChangeEvent<T>> listener)
      Description copied from interface: DataGridItems
      Registers a new value change listener.
      Specified by:
      addValueChangeListener in interface DataGridItems<T>
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • addItemSetChangeListener

      public com.vaadin.flow.shared.Registration addItemSetChangeListener(Consumer<DataGridItems.ItemSetChangeEvent<T>> listener)
      Description copied from interface: DataGridItems
      Registers a new item set change listener.
      Specified by:
      addItemSetChangeListener in interface DataGridItems<T>
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • addSelectedItemChangeListener

      public com.vaadin.flow.shared.Registration addSelectedItemChangeListener(Consumer<DataGridItems.SelectedItemChangeEvent<T>> listener)
      Description copied from interface: DataGridItems
      Registers a new selected item change listener.
      Specified by:
      addSelectedItemChangeListener in interface DataGridItems<T>
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • containsItem

      public boolean containsItem(T item)
      Specified by:
      containsItem in interface DataGridItems<T>
      Parameters:
      item - an item to check
      Returns:
      true if the underlying collection contains an item, false otherwise
    • sort

      public void sort(Object[] propertyId, boolean[] ascending)
      Specified by:
      sort in interface DataGridItems.Sortable<T>
    • resetSortOrder

      public void resetSortOrder()
      Specified by:
      resetSortOrder in interface DataGridItems.Sortable<T>