Interface JmixPivotTableItems<T>

Type Parameters:
T - type of items contained
All Superinterfaces:
Serializable
All Known Subinterfaces:
PivotTableItems<T>
All Known Implementing Classes:
ContainerPivotTableItems, EmptyPivotTableItems, JmixEmptyPivotTableItems, ListPivotTableItems

public interface JmixPivotTableItems<T> extends Serializable
Base interface for JmixPivotTable component items element implementation.
  • Method Details

    • getItems

      Collection<T> getItems()
      Returns:
      unmodifiable collection of items
    • getItem

      T getItem(Object itemId)
      Finds an item by its id.
      Parameters:
      itemId - the item id
      Returns:
      the item by the given id
    • getItemValue

      @Nullable <V> V getItemValue(T item, String propertyPath)
      Parameters:
      item - the item
      propertyPath - the property path
      Returns:
      the item value
    • getItemId

      @Nullable Object getItemId(T item)
      Parameters:
      item - the item
      Returns:
      the id of the item
    • setItemValue

      void setItemValue(T item, String propertyPath, @Nullable Object value)
      Sets the value to the item.
      Parameters:
      item - the item
      propertyPath - the property path
      value - the value to set
    • getItem

      T getItem(String stringId)
      Finds an item by its string id.
      Parameters:
      stringId - the item string id
      Returns:
      the item by the given id
    • updateItem

      void updateItem(T item)
      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.
      Parameters:
      item - item to update
    • containsItem

      boolean containsItem(T item)
      Parameters:
      item - an item to check
      Returns:
      true if the underlying collection contains an item, false otherwise
    • addItemsChangeListener

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