Package io.jmix.ui.model.impl
Class KeyValueContainerImpl
java.lang.Object
io.jmix.ui.model.impl.InstanceContainerImpl<KeyValueEntity>
io.jmix.ui.model.impl.KeyValueContainerImpl
- All Implemented Interfaces:
HasLoader
,ItemPropertyChangeNotifier
,InstanceContainer<KeyValueEntity>
,KeyValueContainer
public class KeyValueContainerImpl
extends InstanceContainerImpl<KeyValueEntity>
implements KeyValueContainer
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.model.InstanceContainer
InstanceContainer.ItemChangeEvent<T>, InstanceContainer.ItemPropertyChangeEvent<T>
-
Field Summary
Fields inherited from class io.jmix.ui.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.Creates newKeyValueEntity
instance initialized withidName
andinstanceMetaClass
defined for the data container.Returns the meta-class of entities that can be stored in the container.Returns the name of a property that represents the entity id.Sets the name of a property that represents the entity id.void
setItem
(KeyValueEntity item) Sets the given entity instance to the container.protected void
updateEntityMetadata
(KeyValueEntity entity) Methods inherited from class io.jmix.ui.model.impl.InstanceContainerImpl
addItemChangeListener, addItemPropertyChangeListener, attachListener, detachListener, fireItemChanged, getFetchPlan, getItem, getItemOrNull, getLoader, itemPropertyChanged, mute, setFetchPlan, setLoader, toString, unmute
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.jmix.ui.model.InstanceContainer
addItemChangeListener, addItemPropertyChangeListener, getFetchPlan, getItem, getItemOrNull, getView, mute, setFetchPlan, setView, unmute
-
Constructor Details
-
KeyValueContainerImpl
public KeyValueContainerImpl() -
KeyValueContainerImpl
-
-
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
-
createEntity
Description copied from interface:KeyValueContainer
Creates newKeyValueEntity
instance initialized withidName
andinstanceMetaClass
defined for the data container.- Specified by:
createEntity
in interfaceKeyValueContainer
-
setItem
Description copied from interface:InstanceContainer
Sets the given entity instance to the container.- Specified by:
setItem
in interfaceInstanceContainer<KeyValueEntity>
- Overrides:
setItem
in classInstanceContainerImpl<KeyValueEntity>
-
updateEntityMetadata
-