Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityEditModel.EditableValue<T>
- Type Parameters:
T
- the value type
- All Superinterfaces:
Consumer<T>
,Observer<T>
,Value<T>
,ValueObserver<T>
- Enclosing interface:
- EntityEditModel
Provides access the an
Attribute
value in the entity being edited.-
Nested Class Summary
Nested classes/interfaces inherited from interface is.codion.common.value.Value
Value.Builder<T,
B extends Value.Builder<T, B>>, Value.BuilderFactory, Value.Notify, Value.Validator<T> -
Method Summary
Modifier and TypeMethodDescriptionReturns theValue
instance controlling the default value supplier for the given attribute.edited()
Returns an observer notified each time this value is edited viaValue.set(Object)
.modified()
Returns aStateObserver
instance indicating whether the value of the given attribute has been modified.persist()
Returns aState
controlling whether the last used value for this attribute should persist when defaults are set.void
revert()
Reverts to the original value if modifiedvalid()
Methods inherited from interface is.codion.common.observer.Observer
addConsumer, addListener, addWeakConsumer, addWeakListener, removeConsumer, removeListener, removeWeakConsumer, removeWeakListener
Methods inherited from interface is.codion.common.value.Value
accept, addValidator, clear, link, link, map, observer, removeValidator, set, unlink, unlink, validate
Methods inherited from interface is.codion.common.value.ValueObserver
get, isEqualTo, isNotEqualTo, isNotNull, isNull, nullable, optional
-
Method Details
-
revert
void revert()Reverts to the original value if modified -
persist
State persist()Returns aState
controlling whether the last used value for this attribute should persist when defaults are set.- Returns:
- a
State
controlling whether the given attribute value should persist when defaults are set - See Also:
-
valid
StateObserver valid()- Returns:
- a
StateObserver
indicating the valid status of this attribute value.
-
modified
StateObserver modified()Returns aStateObserver
instance indicating whether the value of the given attribute has been modified.- Returns:
- a
StateObserver
indicating the modified state of the value of the given attribute - See Also:
-
edited
Returns an observer notified each time this value is edited viaValue.set(Object)
.This event is not triggered when the value changes due to the entity being set via
Value.set(Object)
orEntityEditModel.EditableEntity.defaults()
.Note that this event is only triggered if the value actually changes.
- Returns:
- an observer notified when the given attribute value is edited
-
defaultValue
Returns theValue
instance controlling the default value supplier for the given attribute. Used when the underlying value is not persistent. UseEntityEditModel.EditableEntity.defaults()
to populate the model with the default values.
-