Package io.jmix.flowui.data.value
Class BufferedContainerValueSource<E,V>
java.lang.Object
io.jmix.flowui.data.value.ContainerValueSource<E,V>
io.jmix.flowui.data.value.BufferedContainerValueSource<E,V>
- All Implemented Interfaces:
BufferedDataUnit
,DataUnit
,EntityDataUnit
,EntityValueSource<E,
,V> HasType<V>
,ValueSource<V>
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class BufferedContainerValueSource<E,V>
extends ContainerValueSource<E,V>
implements BufferedDataUnit
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnit
DataUnit.StateChangeEvent
Nested classes/interfaces inherited from interface io.jmix.flowui.data.EntityValueSource
EntityValueSource.InstanceChangeEvent<E>
Nested classes/interfaces inherited from interface io.jmix.flowui.data.ValueSource
ValueSource.ValueChangeEvent<V>
-
Field Summary
Fields inherited from class io.jmix.flowui.data.value.ContainerValueSource
container, dataModelSecurityEnabled, events, metaPropertyPath, property, state
-
Constructor Summary
ConstructorDescriptionBufferedContainerValueSource
(InstanceContainer<E> container, String property) BufferedContainerValueSource
(InstanceContainer<E> container, String property, boolean buffered) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
discard()
Discards all changes since the last timeBufferedDataUnit.write()
is invoked.getValue()
boolean
boolean
void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) protected void
setState
(BindingState state) void
protected void
setValueInternal
(V value) void
write()
Writes all changes since the last time this method is invoked.Methods inherited from class io.jmix.flowui.data.value.ContainerValueSource
addInstanceChangeListener, addStateChangeListener, addValueChangeListener, canUpdateMasterRefs, containerItemChanged, copyPropertyCollection, getContainer, getDataContext, getEntityMetaClass, getInverseProperty, getItem, getMetaPropertyPath, getState, getType, isCollectionPropertyType, isDataModelSecurityEnabled, isEqualCollectionValue, isReadOnly, setDataModelSecurityEnabled, updateMasterRefs
-
Field Details
-
buffered
protected boolean buffered -
internalValue
-
-
Constructor Details
-
BufferedContainerValueSource
-
BufferedContainerValueSource
public BufferedContainerValueSource(InstanceContainer<E> container, String property, boolean buffered)
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Overrides:
setApplicationContext
in classContainerValueSource<E,
V>
-
containerItemPropertyChanged
- Overrides:
containerItemPropertyChanged
in classContainerValueSource<E,
V>
-
setState
- Overrides:
setState
in classContainerValueSource<E,
V>
-
isBuffered
public boolean isBuffered()- Specified by:
isBuffered
in interfaceBufferedDataUnit
- Returns:
true
if this data unit in buffered mode,false
otherwise.
-
getValue
- Specified by:
getValue
in interfaceValueSource<E>
- Overrides:
getValue
in classContainerValueSource<E,
V>
-
setValue
- Specified by:
setValue
in interfaceValueSource<E>
- Overrides:
setValue
in classContainerValueSource<E,
V>
-
setValueInternal
-
write
public void write()Description copied from interface:BufferedDataUnit
Writes all changes since the last time this method is invoked.- Specified by:
write
in interfaceBufferedDataUnit
-
discard
public void discard()Description copied from interface:BufferedDataUnit
Discards all changes since the last timeBufferedDataUnit.write()
is invoked.- Specified by:
discard
in interfaceBufferedDataUnit
-
isModified
public boolean isModified()- Specified by:
isModified
in interfaceBufferedDataUnit
- Returns:
true
if this data unit stores changed data,false
otherwise.
-