Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityEditModel.EditableValue<T>
- Type Parameters:
T- the value type
- All Superinterfaces:
Consumer<T>,is.codion.common.observer.Observer<T>,is.codion.common.value.Value<T>,is.codion.common.value.ValueObserver<T>
- Enclosing interface:
- EntityEditModel
public static interface EntityEditModel.EditableValue<T>
extends is.codion.common.value.Value<T>
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
is.codion.common.value.Value.Builder<T extends Object,B extends is.codion.common.value.Value.Builder<T, B>>, is.codion.common.value.Value.BuilderFactory, is.codion.common.value.Value.Notify, is.codion.common.value.Value.Validator<T extends Object> -
Method Summary
Modifier and TypeMethodDescriptionReturns theValueinstance controlling the default value supplier for the given attribute.is.codion.common.observer.Observer<T>edited()Returns an observer notified each time this value is edited viaValue.set(Object).is.codion.common.state.StateObservermodified()Returns aStateObserverinstance indicating whether the value of the given attribute has been modified.is.codion.common.state.Statepersist()Returns aStatecontrolling whether the last used value for this attribute should persist when defaults are set.voidrevert()Reverts to the original value if modifiedis.codion.common.state.StateObservervalid()Methods inherited from interface is.codion.common.observer.Observer
addConsumer, addListener, addWeakConsumer, addWeakListener, removeConsumer, removeListener, removeWeakConsumer, removeWeakListenerMethods inherited from interface is.codion.common.value.Value
accept, addValidator, clear, link, link, map, observer, removeValidator, set, unlink, unlink, validateMethods 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
is.codion.common.state.State persist()Returns aStatecontrolling whether the last used value for this attribute should persist when defaults are set.- Returns:
- a
Statecontrolling whether the given attribute value should persist when defaults are set - See Also:
-
valid
is.codion.common.state.StateObserver valid()- Returns:
- a
StateObserverindicating the valid status of this attribute value.
-
modified
is.codion.common.state.StateObserver modified()Returns aStateObserverinstance indicating whether the value of the given attribute has been modified.- Returns:
- a
StateObserverindicating the modified state of the value of the given attribute - See Also:
-
edited
is.codion.common.observer.Observer<T> 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 theValueinstance 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.- Returns:
- the
Valueinstance controlling the default value supplier - See Also:
-