Package io.jmix.flowui.model.impl
Class CollectionPropertyContainerImpl<E>
java.lang.Object
io.jmix.flowui.model.impl.InstanceContainerImpl<E>
io.jmix.flowui.model.impl.CollectionContainerImpl<E>
io.jmix.flowui.model.impl.CollectionPropertyContainerImpl<E>
- All Implemented Interfaces:
CollectionContainer<E>
,CollectionPropertyContainer<E>
,HasLoader
,ItemPropertyChangeNotifier
,InstanceContainer<E>
,Nested
public class CollectionPropertyContainerImpl<E>
extends CollectionContainerImpl<E>
implements CollectionPropertyContainer<E>
-
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
ConstructorDescriptionCollectionPropertyContainerImpl
(MetaClass metaClass, InstanceContainer master, String property) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addToCollection
(E entity) Same asCollectionPropertyContainer.getMutableItems()
but changes in the list are not reflected in the underlying property.Returns the container holding the master entity.protected MetaProperty
Returns mutable list of contained entities.Returns the name of the master entity property.protected Collection<E>
initMasterCollection
(MetaProperty metaProperty, Collection<E> newCollection) protected void
replaceInCollection
(int idx, E entity) void
setDisconnectedItems
(Collection<E> entities) Same asCollectionContainer.setItems(Collection)
but does not affect the underlying property.void
setItems
(Collection<E> entities) Sets a collection of entities to the container.protected void
Methods inherited from class io.jmix.flowui.model.impl.CollectionContainerImpl
addCollectionChangeListener, attachListener, buildIdMap, clearItemIfNotExists, containsItem, detachListener, fireCollectionChanged, getItem, getItemIndex, getItemOrNull, getItems, getSorter, itemPropertyChanged, replaceItem, setItem, setSorter, toString, unmute
Methods inherited from class io.jmix.flowui.model.impl.InstanceContainerImpl
addItemChangeListener, addItemPropertyChangeListener, attachListener, detachListener, fireItemChanged, getEntityMetaClass, 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, getEntityMetaClass, getFetchPlan, getItem, getItemOrNull, getView, mute, setFetchPlan, setItem, setView, unmute
-
Field Details
-
master
-
property
-
-
Constructor Details
-
CollectionPropertyContainerImpl
public CollectionPropertyContainerImpl(MetaClass metaClass, InstanceContainer master, String property)
-
-
Method Details
-
getMaster
Description copied from interface:Nested
Returns the container holding the master entity. -
getProperty
Description copied from interface:Nested
Returns the name of the master entity property.- Specified by:
getProperty
in interfaceNested
-
getDisconnectedItems
Description copied from interface:CollectionPropertyContainer
Same asCollectionPropertyContainer.getMutableItems()
but changes in the list are not reflected in the underlying property.- Specified by:
getDisconnectedItems
in interfaceCollectionPropertyContainer<E>
-
setDisconnectedItems
Description copied from interface:CollectionPropertyContainer
Same asCollectionContainer.setItems(Collection)
but does not affect the underlying property.- Specified by:
setDisconnectedItems
in interfaceCollectionPropertyContainer<E>
-
getMutableItems
Description copied from interface:CollectionContainer
Returns mutable list of contained entities. Changes in the list produceCollectionContainer.CollectionChangeEvent
.- Specified by:
getMutableItems
in interfaceCollectionContainer<E>
- Specified by:
getMutableItems
in interfaceCollectionPropertyContainer<E>
- Overrides:
getMutableItems
in classCollectionContainerImpl<E>
-
setItems
Description copied from interface:CollectionContainer
Sets a collection of entities to the container.- Specified by:
setItems
in interfaceCollectionContainer<E>
- Overrides:
setItems
in classCollectionContainerImpl<E>
-
updateMaster
protected void updateMaster() -
getMasterProperty
-
initMasterCollection
protected Collection<E> initMasterCollection(MetaProperty metaProperty, Collection<E> newCollection) -
replaceInCollection
- Overrides:
replaceInCollection
in classCollectionContainerImpl<E>
-
addToCollection
- Overrides:
addToCollection
in classCollectionContainerImpl<E>
-