public class CollectionPropertyContainerImpl<E> extends CollectionContainerImpl<E> implements CollectionPropertyContainer<E>
CollectionContainer.CollectionChangeEvent<T>, CollectionContainer.UnmuteEventsMode
InstanceContainer.ItemChangeEvent<T>, InstanceContainer.ItemPropertyChangeEvent<T>
Modifier and Type | Field and Description |
---|---|
protected InstanceContainer |
master |
protected java.lang.String |
property |
collection, idMap, metadataTools, sorter
entityMetaClass, events, fetchPlan, item, listener, listenersEnabled, loader, metadata
Constructor and Description |
---|
CollectionPropertyContainerImpl(io.jmix.core.metamodel.model.MetaClass metaClass,
InstanceContainer master,
java.lang.String property) |
Modifier and Type | Method and Description |
---|---|
protected void |
addToCollection(E entity) |
java.util.List<E> |
getDisconnectedItems()
Same as
CollectionPropertyContainer.getMutableItems() but changes in the list are not reflected in the underlying property. |
InstanceContainer |
getMaster()
Returns the container holding the master entity.
|
protected io.jmix.core.metamodel.model.MetaProperty |
getMasterProperty() |
java.util.List<E> |
getMutableItems()
Returns mutable list of contained entities.
|
java.lang.String |
getProperty()
Returns the name of the master entity property.
|
protected java.util.Collection<E> |
initMasterCollection(io.jmix.core.metamodel.model.MetaProperty metaProperty,
java.util.Collection<E> newCollection) |
protected void |
replaceInCollection(int idx,
E entity) |
void |
setDisconnectedItems(java.util.Collection<E> entities)
Same as
CollectionContainer.setItems(Collection) but does not affect the underlying property. |
void |
setItems(java.util.Collection<E> entities)
Sets a collection of entities to the container.
|
protected void |
updateMaster() |
addCollectionChangeListener, attachListener, buildIdMap, clearItemIfNotExists, containsItem, detachListener, fireCollectionChanged, getItem, getItemIndex, getItemOrNull, getItems, getSorter, itemPropertyChanged, replaceItem, setItem, setSorter, toString, unmute
addItemChangeListener, addItemPropertyChangeListener, attachListener, detachListener, fireItemChanged, getEntityMetaClass, getFetchPlan, getItem, getItemOrNull, getLoader, mute, setFetchPlan, setLoader, unmute
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addCollectionChangeListener, containsItem, getItem, getItemIndex, getItemOrNull, getItems, getSorter, replaceItem, setSorter, unmute
addItemChangeListener, addItemPropertyChangeListener, getEntityMetaClass, getFetchPlan, getItem, getItemOrNull, getView, mute, setFetchPlan, setItem, setView, unmute
protected InstanceContainer master
protected java.lang.String property
public CollectionPropertyContainerImpl(io.jmix.core.metamodel.model.MetaClass metaClass, InstanceContainer master, java.lang.String property)
public InstanceContainer getMaster()
Nested
public java.lang.String getProperty()
Nested
getProperty
in interface Nested
public java.util.List<E> getDisconnectedItems()
CollectionPropertyContainer
CollectionPropertyContainer.getMutableItems()
but changes in the list are not reflected in the underlying property.getDisconnectedItems
in interface CollectionPropertyContainer<E>
public void setDisconnectedItems(@Nullable java.util.Collection<E> entities)
CollectionPropertyContainer
CollectionContainer.setItems(Collection)
but does not affect the underlying property.setDisconnectedItems
in interface CollectionPropertyContainer<E>
public java.util.List<E> getMutableItems()
CollectionContainer
CollectionContainer.CollectionChangeEvent
.getMutableItems
in interface CollectionContainer<E>
getMutableItems
in interface CollectionPropertyContainer<E>
getMutableItems
in class CollectionContainerImpl<E>
public void setItems(@Nullable java.util.Collection<E> entities)
CollectionContainer
setItems
in interface CollectionContainer<E>
setItems
in class CollectionContainerImpl<E>
protected void updateMaster()
protected io.jmix.core.metamodel.model.MetaProperty getMasterProperty()
protected java.util.Collection<E> initMasterCollection(io.jmix.core.metamodel.model.MetaProperty metaProperty, java.util.Collection<E> newCollection)
protected void replaceInCollection(int idx, E entity)
replaceInCollection
in class CollectionContainerImpl<E>
protected void addToCollection(E entity)
addToCollection
in class CollectionContainerImpl<E>