Class JmixEmptyPivotTableItems<T>

java.lang.Object
io.jmix.pivottableflowui.kit.data.JmixEmptyPivotTableItems<T>
Type Parameters:
T - type of items contained
All Implemented Interfaces:
JmixPivotTableItems<T>, Serializable
Direct Known Subclasses:
EmptyPivotTableItems

public class JmixEmptyPivotTableItems<T> extends Object implements JmixPivotTableItems<T>
Empty data provider for a JmixPivotTable component.
See Also:
  • Field Details

  • Constructor Details

    • JmixEmptyPivotTableItems

      public JmixEmptyPivotTableItems()
  • Method Details

    • getInstance

      public static <T> JmixEmptyPivotTableItems<T> getInstance()
      Type Parameters:
      T - type of items contained
      Returns:
      instance of the JmixEmptyPivotTableItems
    • getItems

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

      @Nullable public T getItem(Object itemId)
      Description copied from interface: JmixPivotTableItems
      Finds an item by its id.
      Specified by:
      getItem in interface JmixPivotTableItems<T>
      Parameters:
      itemId - the item id
      Returns:
      the item by the given id
    • getItem

      @Nullable public T getItem(String stringId)
      Description copied from interface: JmixPivotTableItems
      Finds an item by its string id.
      Specified by:
      getItem in interface JmixPivotTableItems<T>
      Parameters:
      stringId - the item string id
      Returns:
      the item by the given id
    • getItemValue

      @Nullable public <V> V getItemValue(T itemId, String propertyId)
      Specified by:
      getItemValue in interface JmixPivotTableItems<T>
      Parameters:
      itemId - the item
      propertyId - the property path
      Returns:
      the item value
    • getItemId

      @Nullable public Object getItemId(T item)
      Specified by:
      getItemId in interface JmixPivotTableItems<T>
      Parameters:
      item - the item
      Returns:
      the id of the item
    • setItemValue

      public void setItemValue(T item, String propertyPath, @Nullable Object value)
      Description copied from interface: JmixPivotTableItems
      Sets the value to the item.
      Specified by:
      setItemValue in interface JmixPivotTableItems<T>
      Parameters:
      item - the item
      propertyPath - the property path
      value - the value to set
    • updateItem

      public void updateItem(T item)
      Description copied from interface: JmixPivotTableItems
      If the item with the same id exists, it is replaced with the given instance. If not, the given instance is added to the items list.
      Specified by:
      updateItem in interface JmixPivotTableItems<T>
      Parameters:
      item - item to update
    • containsItem

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

      public com.vaadin.flow.shared.Registration addItemsChangeListener(Consumer<JmixPivotTableItems.ItemsChangeEvent<T>> listener)
      Description copied from interface: JmixPivotTableItems
      Adds a listener that will be called when the associated collection or the property of an item of this collection changes.
      Specified by:
      addItemsChangeListener in interface JmixPivotTableItems<T>
      Parameters:
      listener - a listener to add
      Returns:
      a handle that can be used for removing the listener