Class ContainerDataProvider<E,F>

java.lang.Object
com.vaadin.flow.data.provider.AbstractDataProvider<E,F>
io.jmix.flowui.data.items.ContainerDataProvider<E,F>
All Implemented Interfaces:
com.vaadin.flow.data.provider.DataProvider<E,F>, ContainerDataUnit<E>, DataUnit, EntityDataUnit, EntityItems<E>, Serializable

public class ContainerDataProvider<E,F> extends com.vaadin.flow.data.provider.AbstractDataProvider<E,F> implements ContainerDataUnit<E>, EntityItems<E>
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • containerCollectionChanged

      protected void containerCollectionChanged(CollectionContainer.CollectionChangeEvent<E> e)
    • containerItemPropertyChanged

      protected void containerItemPropertyChanged(InstanceContainer.ItemPropertyChangeEvent<E> e)
    • getEntityMetaClass

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

      public CollectionContainer<E> getContainer()
      Specified by:
      getContainer in interface ContainerDataUnit<E>
    • setSelectedItem

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

      public boolean containsItem(@Nullable E item)
      Specified by:
      containsItem in interface EntityItems<E>
      Returns:
      true if the underlying collection contains an item with the specified ID
    • updateItem

      public void updateItem(E item)
      Description copied from interface: EntityItems
      Update an item in the collection if it is already there.
      Specified by:
      updateItem in interface EntityItems<E>
    • refresh

      public void refresh()
      Description copied from interface: EntityItems
      Refreshes the source moving it to the BindingState.ACTIVE state
      Specified by:
      refresh in interface EntityItems<E>
    • isInMemory

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

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

      public Stream<E> fetch(com.vaadin.flow.data.provider.Query<E,F> query)
      Specified by:
      fetch in interface com.vaadin.flow.data.provider.DataProvider<E,F>
    • getItems

      protected Stream<E> getItems()
    • 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
    • getEventBus

      protected EventBus getEventBus()