Interface EntityEditModel<R extends EntityEditor<R>>

Type Parameters:
R - the EntityEditor type
All Known Implementing Classes:
AbstractEntityEditModel, SwingEntityEditModel

public interface EntityEditModel<R extends EntityEditor<R>>
Represents the context for editing an Entity instance. The underlying attribute values are available via EntityEditor.value(Attribute).
See Also:
  • Method Details

    • entityType

      EntityType entityType()
      Returns:
      the type of the entity this edit model is based on
    • connectionProvider

      EntityConnectionProvider connectionProvider()
      Returns:
      the connection provider used by this edit model
    • connection

      EntityConnection connection()
      Do not cache or keep the connection returned by this method in a long living field, since it may become invalid and thereby unusable.
      Returns:
      the connection used by this edit model
    • editor

      R editor()
      Returns a EntityEditor wrapping the entity being edited. EntityEditor.EditorEntity.get() returns an immutable copy of the Entity instance being edited, while EntityEditor.EditorEntity.set(Entity) copies the values from the given Entity into the underlying Entity. Note that value changes must go through the EntityEditor.EditorValue accessible via EntityEditor.value(Attribute).
      Returns:
      the EntityEditor wrapping the Entity instance being edited
      See Also:
    • entities

      Entities entities()
      Returns:
      the underlying domain entities
    • entityDefinition

      EntityDefinition entityDefinition()
      Returns:
      the definition of the underlying entity
    • store

      default void store(Preferences preferences)
      Stores any custom persistent state to the given preferences node. Does nothing by default, override to persist edit model state along with the rest of the model tree.
      Parameters:
      preferences - the preferences node to store to
      See Also:
    • restore

      default void restore(Preferences preferences)
      Restores any custom persistent state from the given preferences node. Does nothing by default, override to restore edit model state along with the rest of the model tree.
      Parameters:
      preferences - the preferences node to restore from
      See Also: