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 Type
    Method
    Description
    is.codion.common.value.Value<Supplier<T>>
    Returns the Value instance controlling the default value supplier for the given attribute.
    is.codion.common.observer.Observer<T>
    Returns an observer notified each time this value is edited via Value.set(Object).
    is.codion.common.state.StateObserver
    Returns a StateObserver instance indicating whether the value of the given attribute has been modified.
    is.codion.common.state.State
    Returns a State controlling whether the last used value for this attribute should persist when defaults are set.
    void
    Reverts to the original value if modified
    is.codion.common.state.StateObserver
     

    Methods inherited from interface java.util.function.Consumer

    andThen

    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

      is.codion.common.state.State persist()
      Returns a State 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

      is.codion.common.state.StateObserver valid()
      Returns:
      a StateObserver indicating the valid status of this attribute value.
    • modified

      is.codion.common.state.StateObserver modified()
      Returns a StateObserver 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

      is.codion.common.observer.Observer<T> edited()
      Returns an observer notified each time this value is edited via Value.set(Object).

      This event is not triggered when the value changes due to the entity being set via Value.set(Object) or EntityEditModel.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

      is.codion.common.value.Value<Supplier<T>> defaultValue()
      Returns the Value instance controlling the default value supplier for the given attribute. Used when the underlying value is not persistent. Use EntityEditModel.EditableEntity.defaults() to populate the model with the default values.
      Returns:
      the Value instance controlling the default value supplier
      See Also: