Package io.jmix.flowui.model.impl
Class InstanceContainerImpl<E>
java.lang.Object
io.jmix.flowui.model.impl.InstanceContainerImpl<E>
- All Implemented Interfaces:
- HasLoader,- ItemPropertyChangeNotifier,- InstanceContainer<E>
- Direct Known Subclasses:
- CollectionContainerImpl,- InstancePropertyContainerImpl,- KeyValueContainerImpl
public class InstanceContainerImpl<E>
extends Object
implements InstanceContainer<E>, HasLoader, ItemPropertyChangeNotifier
- 
Nested Class SummaryNested classes/interfaces inherited from interface io.jmix.flowui.model.InstanceContainerInstanceContainer.ItemChangeEvent<T>, InstanceContainer.ItemPropertyChangeEvent<T>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected MetaClassprotected EventHubprotected FetchPlanprotected Eprotected EntityPropertyChangeListenerprotected booleanprotected DataLoaderprotected Metadata
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAdds listener toInstanceContainer.ItemChangeEvents.Adds listener toInstanceContainer.ItemPropertyChangeEvents.protected voidattachListener(Object entity) protected voiddetachListener(Object entity) protected voidfireItemChanged(E prevItem) Returns the meta-class of entities that can be stored in the container.Returns the view which was set by previous call toInstanceContainer.setFetchPlan(FetchPlan).getItem()Returns the contained entity instance.Returns the contained entity instance or null if there is no entity in the container.Returns the loader of this container.voidvoidmute()Disables all event listeners on container data change.voidsetFetchPlan(FetchPlan fetchPlan) Sets a view to be used when loading entities for this container.voidSets the given entity instance to the container.voidsetLoader(DataLoader loader) Sets the loader for this container.voidsetMetadata(Metadata metadata) toString()voidunmute()Enables all event listeners.
- 
Field Details- 
metadata
- 
item
- 
entityMetaClass
- 
fetchPlan
- 
events
- 
listener
- 
loader
- 
listenersEnabledprotected boolean listenersEnabled
 
- 
- 
Constructor Details- 
InstanceContainerImpl
 
- 
- 
Method Details- 
setMetadata
- 
getItemOrNullDescription copied from interface:InstanceContainerReturns the contained entity instance or null if there is no entity in the container.- Specified by:
- getItemOrNullin interface- InstanceContainer<E>
 
- 
getItemDescription copied from interface:InstanceContainerReturns the contained entity instance.- Specified by:
- getItemin interface- InstanceContainer<E>
 
- 
setItemDescription copied from interface:InstanceContainerSets the given entity instance to the container.- Specified by:
- setItemin interface- InstanceContainer<E>
 
- 
getEntityMetaClassDescription copied from interface:InstanceContainerReturns the meta-class of entities that can be stored in the container.- Specified by:
- getEntityMetaClassin interface- InstanceContainer<E>
 
- 
getFetchPlanDescription copied from interface:InstanceContainerReturns the view which was set by previous call toInstanceContainer.setFetchPlan(FetchPlan). The view is normally used when loading entities for this container.- Specified by:
- getFetchPlanin interface- InstanceContainer<E>
 
- 
setFetchPlanDescription copied from interface:InstanceContainerSets a view to be used when loading entities for this container.- Specified by:
- setFetchPlanin interface- InstanceContainer<E>
 
- 
addItemPropertyChangeListenerpublic Subscription addItemPropertyChangeListener(Consumer<InstanceContainer.ItemPropertyChangeEvent<E>> listener) Description copied from interface:InstanceContainerAdds listener toInstanceContainer.ItemPropertyChangeEvents.- Specified by:
- addItemPropertyChangeListenerin interface- InstanceContainer<E>
 
- 
addItemChangeListenerDescription copied from interface:InstanceContainerAdds listener toInstanceContainer.ItemChangeEvents.- Specified by:
- addItemChangeListenerin interface- InstanceContainer<E>
 
- 
attachListener
- 
detachListener
- 
toString
- 
getLoaderDescription copied from interface:HasLoaderReturns the loader of this container.
- 
setLoaderDescription copied from interface:HasLoaderSets the loader for this container.
- 
fireItemChanged
- 
itemPropertyChanged- Specified by:
- itemPropertyChangedin interface- ItemPropertyChangeNotifier
 
- 
mutepublic void mute()Description copied from interface:InstanceContainerDisables all event listeners on container data change.
 Can be used withInstanceContainer.unmute()for bulk data modification as a perfomance optimization.- Specified by:
- mutein interface- InstanceContainer<E>
 
- 
unmutepublic void unmute()Description copied from interface:InstanceContainerEnables all event listeners. No events are fired on this call.- Specified by:
- unmutein interface- InstanceContainer<E>
 
 
-