Package io.jmix.pivottableflowui.data
Class ContainerPivotTableItems<T>
java.lang.Object
io.jmix.pivottableflowui.data.ContainerPivotTableItems<T>
- Type Parameters:
T
- type of items contained
- All Implemented Interfaces:
ContainerDataUnit<T>
,DataUnit
,EntityDataUnit
,HasType<T>
,PivotTableItems<T>
,JmixPivotTableItems<T>
,Serializable
public class ContainerPivotTableItems<T>
extends Object
implements ContainerDataUnit<T>, PivotTableItems<T>
Data provider bound to the
CollectionContainer
for a PivotTable
component.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnit
DataUnit.StateChangeEvent
Nested classes/interfaces inherited from interface io.jmix.pivottableflowui.kit.data.JmixPivotTableItems
JmixPivotTableItems.ItemsChangeEvent<T>, JmixPivotTableItems.ItemsChangeType
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registration
Adds a listener that will be called when the associated collection or the property of an item of this collection changes.com.vaadin.flow.shared.Registration
Registers a new state change listener.protected void
protected void
boolean
containsItem
(T item) protected JmixPivotTableItems.ItemsChangeType
convertToItemsChangeType
(CollectionChangeType changeType) protected Object
deserializeId
(String stringValue) protected EventBus
Finds an item by its id.Finds an item by its string id.getItems()
<V> V
getItemValue
(T item, String propertyId) getState()
getType()
protected void
initContainer
(CollectionContainer<T> container) void
setItemValue
(T item, String propertyPath, Object value) Sets the value to the item.void
updateItem
(T item) If the item with the same id exists, it is replaced with the given instance.
-
Field Details
-
container
-
idType
-
-
Constructor Details
-
ContainerPivotTableItems
-
-
Method Details
-
initContainer
-
containerCollectionChanged
-
containerItemPropertyChanged
-
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 interfaceJmixPivotTableItems<T>
- Parameters:
listener
- a listener to add- Returns:
- a handle that can be used for removing the listener
-
getItems
- Specified by:
getItems
in interfaceJmixPivotTableItems<T>
- Returns:
- unmodifiable collection of items
-
getItemValue
- Specified by:
getItemValue
in interfaceJmixPivotTableItems<T>
- Parameters:
item
- the itempropertyId
- the property path- Returns:
- the item value
-
setItemValue
Description copied from interface:JmixPivotTableItems
Sets the value to the item.- Specified by:
setItemValue
in interfaceJmixPivotTableItems<T>
- Parameters:
item
- the itempropertyPath
- the property pathvalue
- the value to set
-
getItemId
- Specified by:
getItemId
in interfaceJmixPivotTableItems<T>
- Parameters:
item
- the item- Returns:
- the id of the item
-
getItem
Description copied from interface:JmixPivotTableItems
Finds an item by its id.- Specified by:
getItem
in interfaceJmixPivotTableItems<T>
- Parameters:
itemId
- the item id- Returns:
- the item by the given id
-
getItem
Description copied from interface:JmixPivotTableItems
Finds an item by its string id.- Specified by:
getItem
in interfaceJmixPivotTableItems<T>
- Parameters:
stringId
- the item string id- Returns:
- the item by the given id
-
updateItem
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 interfaceJmixPivotTableItems<T>
- Parameters:
item
- item to update
-
containsItem
- Specified by:
containsItem
in interfaceJmixPivotTableItems<T>
- Parameters:
item
- an item to check- Returns:
true
if the underlying collection contains an item,false
otherwise
-
getType
-
getContainer
- Specified by:
getContainer
in interfaceContainerDataUnit<T>
-
getEntityMetaClass
- Specified by:
getEntityMetaClass
in interfaceEntityDataUnit
- Returns:
MetaClass
of an entity contained in the source
-
getState
-
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 interfaceDataUnit
- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
deserializeId
-
convertToItemsChangeType
protected JmixPivotTableItems.ItemsChangeType convertToItemsChangeType(CollectionChangeType changeType) -
getEventBus
-