public class CollectionPropertyContainerImpl<E> extends CollectionContainerImpl<E> implements CollectionPropertyContainer<E>
CollectionContainer.CollectionChangeEvent<T>, CollectionContainer.UnmuteEventsModeInstanceContainer.ItemChangeEvent<T>, InstanceContainer.ItemPropertyChangeEvent<T>| Modifier and Type | Field and Description |
|---|---|
protected InstanceContainer |
master |
protected java.lang.String |
property |
collection, idMap, metadataTools, sorterentityMetaClass, 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, unmuteaddItemChangeListener, addItemPropertyChangeListener, attachListener, detachListener, fireItemChanged, getEntityMetaClass, getFetchPlan, getItem, getItemOrNull, getLoader, mute, setFetchPlan, setLoader, unmuteclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCollectionChangeListener, containsItem, getItem, getItemIndex, getItemOrNull, getItems, getSorter, replaceItem, setSorter, unmuteaddItemChangeListener, addItemPropertyChangeListener, getEntityMetaClass, getFetchPlan, getItem, getItemOrNull, getView, mute, setFetchPlan, setItem, setView, unmuteprotected 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()
Nestedpublic java.lang.String getProperty()
NestedgetProperty in interface Nestedpublic java.util.List<E> getDisconnectedItems()
CollectionPropertyContainerCollectionPropertyContainer.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)
CollectionPropertyContainerCollectionContainer.setItems(Collection) but does not affect the underlying property.setDisconnectedItems in interface CollectionPropertyContainer<E>public java.util.List<E> getMutableItems()
CollectionContainerCollectionContainer.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)
CollectionContainersetItems 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>