Package io.jmix.flowui.model.impl
Class KeyValueCollectionContainerImpl
java.lang.Object
io.jmix.flowui.model.impl.InstanceContainerImpl<E>
io.jmix.flowui.model.impl.CollectionContainerImpl<KeyValueEntity>
io.jmix.flowui.model.impl.KeyValueCollectionContainerImpl
- All Implemented Interfaces:
CollectionContainer<KeyValueEntity>
,HasLoader
,ItemPropertyChangeNotifier
,InstanceContainer<KeyValueEntity>
,KeyValueCollectionContainer
,KeyValueContainer
public class KeyValueCollectionContainerImpl
extends CollectionContainerImpl<KeyValueEntity>
implements KeyValueCollectionContainer
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.model.CollectionContainer
CollectionContainer.CollectionChangeEvent<T>, CollectionContainer.UnmuteEventsMode
Nested classes/interfaces inherited from interface io.jmix.flowui.model.InstanceContainer
InstanceContainer.ItemChangeEvent<T>, InstanceContainer.ItemPropertyChangeEvent<T>
-
Field Summary
Fields inherited from class io.jmix.flowui.model.impl.CollectionContainerImpl
collection, idMap, metadataTools, sorter
Fields inherited from class io.jmix.flowui.model.impl.InstanceContainerImpl
entityMetaClass, events, fetchPlan, item, listener, listenersEnabled, loader, metadata
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddProperty
(String name) Adds a string property to the meta-class of this loader.addProperty
(String name, Datatype datatype) Adds a property of the given datatype to the meta-class of this loader.addProperty
(String name, Class aClass) Adds a property of the given Java class to the meta-class of this loader.Returns the meta-class of entities that can be stored in the container.Returns the name of a property that represents the entity id.Returns mutable list of contained entities.Sets the name of a property that represents the entity id.void
setItems
(Collection<KeyValueEntity> entities) Sets a collection of entities to the container.toString()
protected void
updateEntityMetadata
(KeyValueEntity entity) Methods inherited from class io.jmix.flowui.model.impl.CollectionContainerImpl
addCollectionChangeListener, addToCollection, attachListener, buildIdMap, clearItemIfNotExists, containsItem, detachListener, fireCollectionChanged, getItem, getItemIndex, getItemOrNull, getItems, getSorter, itemPropertyChanged, replaceInCollection, replaceItem, setItem, setSorter, unmute
Methods inherited from class io.jmix.flowui.model.impl.InstanceContainerImpl
addItemChangeListener, addItemPropertyChangeListener, attachListener, detachListener, fireItemChanged, getFetchPlan, getItem, getItemOrNull, getLoader, mute, setFetchPlan, setLoader, unmute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.jmix.flowui.model.CollectionContainer
addCollectionChangeListener, containsItem, getItem, getItemIndex, getItemOrNull, getItems, getSorter, replaceItem, setSorter, unmute
Methods inherited from interface io.jmix.flowui.model.InstanceContainer
addItemChangeListener, addItemPropertyChangeListener, getFetchPlan, getItem, getItemOrNull, getView, mute, setFetchPlan, setItem, setView, unmute
-
Constructor Details
-
KeyValueCollectionContainerImpl
public KeyValueCollectionContainerImpl()
-
-
Method Details
-
getEntityMetaClass
Description copied from interface:InstanceContainer
Returns the meta-class of entities that can be stored in the container.- Specified by:
getEntityMetaClass
in interfaceInstanceContainer<KeyValueEntity>
- Overrides:
getEntityMetaClass
in classInstanceContainerImpl<KeyValueEntity>
-
setIdName
Description copied from interface:KeyValueContainer
Sets the name of a property that represents the entity id.- Specified by:
setIdName
in interfaceKeyValueContainer
- Returns:
- this instance for chaining
-
getIdName
Description copied from interface:KeyValueContainer
Returns the name of a property that represents the entity id.- Specified by:
getIdName
in interfaceKeyValueContainer
-
addProperty
Description copied from interface:KeyValueContainer
Adds a string property to the meta-class of this loader.- Specified by:
addProperty
in interfaceKeyValueContainer
- Returns:
- this instance for chaining
-
addProperty
Description copied from interface:KeyValueContainer
Adds a property of the given Java class to the meta-class of this loader. The Java class can be an entity or a datatype.- Specified by:
addProperty
in interfaceKeyValueContainer
- Returns:
- this instance for chaining
-
addProperty
Description copied from interface:KeyValueContainer
Adds a property of the given datatype to the meta-class of this loader.- Specified by:
addProperty
in interfaceKeyValueContainer
- Returns:
- this instance for chaining
-
setItems
Description copied from interface:CollectionContainer
Sets a collection of entities to the container.- Specified by:
setItems
in interfaceCollectionContainer<KeyValueEntity>
- Overrides:
setItems
in classCollectionContainerImpl<KeyValueEntity>
-
getMutableItems
Description copied from interface:CollectionContainer
Returns mutable list of contained entities. Changes in the list produceCollectionContainer.CollectionChangeEvent
.- Specified by:
getMutableItems
in interfaceCollectionContainer<KeyValueEntity>
- Overrides:
getMutableItems
in classCollectionContainerImpl<KeyValueEntity>
-
updateEntityMetadata
-
toString
- Overrides:
toString
in classCollectionContainerImpl<KeyValueEntity>
-