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.UnmuteEventsModeNested classes/interfaces inherited from interface io.jmix.flowui.model.InstanceContainer
InstanceContainer.ItemChangeEvent<T>, InstanceContainer.ItemPropertyChangeEvent<T> -
Field Summary
FieldsFields inherited from class io.jmix.flowui.model.impl.CollectionContainerImpl
collection, idMap, metadataTools, sorterFields inherited from class io.jmix.flowui.model.impl.InstanceContainerImpl
entityMetaClass, events, fetchPlan, item, listener, listenersEnabled, loader, metadata -
Constructor Summary
ConstructorsConstructorDescriptionCollectionPropertyContainerImpl(MetaClass metaClass, InstanceContainer<?> master, String property) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToCollection(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 MetaPropertyReturns mutable list of contained entities.Returns the name of the master entity property.protected Collection<E>initMasterCollection(MetaProperty metaProperty, Collection<E> newCollection) protected voidreplaceInCollection(int idx, E entity) voidsetDisconnectedItems(Collection<E> entities) Same asCollectionContainer.setItems(Collection)but does not affect the underlying property.voidsetItems(Collection<E> entities) Sets a collection of entities to the container.protected voidMethods 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, unmuteMethods inherited from class io.jmix.flowui.model.impl.InstanceContainerImpl
addItemChangeListener, addItemPropertyChangeListener, attachListener, detachListener, fireItemChanged, getEntityMetaClass, getFetchPlan, getItem, getItemOrNull, getLoader, mute, setFetchPlan, setLoader, setMetadata, unmuteMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.jmix.flowui.model.CollectionContainer
addCollectionChangeListener, containsItem, getItem, getItemIndex, getItemOrNull, getItems, getSorter, replaceItem, setSorter, unmuteMethods 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:NestedReturns the container holding the master entity. -
getProperty
Description copied from interface:NestedReturns the name of the master entity property.- Specified by:
getPropertyin interfaceNested
-
getDisconnectedItems
Description copied from interface:CollectionPropertyContainerSame asCollectionPropertyContainer.getMutableItems()but changes in the list are not reflected in the underlying property.- Specified by:
getDisconnectedItemsin interfaceCollectionPropertyContainer<E>
-
setDisconnectedItems
Description copied from interface:CollectionPropertyContainerSame asCollectionContainer.setItems(Collection)but does not affect the underlying property.- Specified by:
setDisconnectedItemsin interfaceCollectionPropertyContainer<E>
-
getMutableItems
Description copied from interface:CollectionContainerReturns mutable list of contained entities. Changes in the list produceCollectionContainer.CollectionChangeEvent.- Specified by:
getMutableItemsin interfaceCollectionContainer<E>- Specified by:
getMutableItemsin interfaceCollectionPropertyContainer<E>- Overrides:
getMutableItemsin classCollectionContainerImpl<E>
-
setItems
Description copied from interface:CollectionContainerSets a collection of entities to the container.- Specified by:
setItemsin interfaceCollectionContainer<E>- Overrides:
setItemsin classCollectionContainerImpl<E>
-
updateMaster
protected void updateMaster() -
getMasterProperty
-
initMasterCollection
protected Collection<E> initMasterCollection(MetaProperty metaProperty, Collection<E> newCollection) -
replaceInCollection
- Overrides:
replaceInCollectionin classCollectionContainerImpl<E>
-
addToCollection
- Overrides:
addToCollectionin classCollectionContainerImpl<E>
-