Package io.jmix.ui.model.impl
Class KeyValueCollectionContainerImpl
java.lang.Object
io.jmix.ui.model.impl.InstanceContainerImpl<E>
io.jmix.ui.model.impl.CollectionContainerImpl<KeyValueEntity>
io.jmix.ui.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.ui.model.CollectionContainer
CollectionContainer.CollectionChangeEvent<T>, CollectionContainer.UnmuteEventsModeNested 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.CollectionContainerImpl
collection, idMap, metadataTools, sorterFields inherited from class io.jmix.ui.model.impl.InstanceContainerImpl
entityMetaClass, events, fetchPlan, item, listener, listenersEnabled, loader, metadata -
Constructor Summary
Constructors -
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 newKeyValueEntityinstance initialized withidNameandinstanceMetaClassdefined 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.Returns mutable list of contained entities.Sets the name of a property that represents the entity id.voidsetItems(Collection<KeyValueEntity> entities) Sets a collection of entities to the container.toString()protected voidupdateEntityMetadata(KeyValueEntity entity) Methods inherited from class io.jmix.ui.model.impl.CollectionContainerImpl
addCollectionChangeListener, addToCollection, attachListener, buildIdMap, clearItemIfNotExists, containsItem, detachListener, fireCollectionChanged, getItem, getItemIndex, getItemOrNull, getItems, getSorter, itemPropertyChanged, replaceInCollection, replaceItem, setItem, setSorter, unmuteMethods inherited from class io.jmix.ui.model.impl.InstanceContainerImpl
addItemChangeListener, addItemPropertyChangeListener, attachListener, detachListener, fireItemChanged, getFetchPlan, getItem, getItemOrNull, getLoader, mute, setFetchPlan, setLoader, unmuteMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.jmix.ui.model.CollectionContainer
addCollectionChangeListener, containsItem, getItem, getItemIndex, getItemOrNull, getItems, getSorter, replaceItem, setSorter, unmuteMethods inherited from interface io.jmix.ui.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:InstanceContainerReturns the meta-class of entities that can be stored in the container.- Specified by:
getEntityMetaClassin interfaceInstanceContainer<KeyValueEntity>- Overrides:
getEntityMetaClassin classInstanceContainerImpl<KeyValueEntity>
-
setIdName
Description copied from interface:KeyValueContainerSets the name of a property that represents the entity id.- Specified by:
setIdNamein interfaceKeyValueContainer- Returns:
- this instance for chaining
-
getIdName
Description copied from interface:KeyValueContainerReturns the name of a property that represents the entity id.- Specified by:
getIdNamein interfaceKeyValueContainer
-
addProperty
Description copied from interface:KeyValueContainerAdds a string property to the meta-class of this loader.- Specified by:
addPropertyin interfaceKeyValueContainer- Returns:
- this instance for chaining
-
addProperty
Description copied from interface:KeyValueContainerAdds 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:
addPropertyin interfaceKeyValueContainer- Returns:
- this instance for chaining
-
addProperty
Description copied from interface:KeyValueContainerAdds a property of the given datatype to the meta-class of this loader.- Specified by:
addPropertyin interfaceKeyValueContainer- Returns:
- this instance for chaining
-
createEntity
Description copied from interface:KeyValueContainerCreates newKeyValueEntityinstance initialized withidNameandinstanceMetaClassdefined for the data container.- Specified by:
createEntityin interfaceKeyValueContainer
-
setItems
Description copied from interface:CollectionContainerSets a collection of entities to the container.- Specified by:
setItemsin interfaceCollectionContainer<KeyValueEntity>- Overrides:
setItemsin classCollectionContainerImpl<KeyValueEntity>
-
getMutableItems
Description copied from interface:CollectionContainerReturns mutable list of contained entities. Changes in the list produceCollectionContainer.CollectionChangeEvent.- Specified by:
getMutableItemsin interfaceCollectionContainer<KeyValueEntity>- Overrides:
getMutableItemsin classCollectionContainerImpl<KeyValueEntity>
-
updateEntityMetadata
-
toString
- Overrides:
toStringin classCollectionContainerImpl<KeyValueEntity>
-