Interface EntityApplicationModel<M extends EntityModel<M,E,T,R>,E extends EntityEditModel<R>,T extends EntityTableModel<E,R>,R extends EntityEditor<R>>

Type Parameters:
M - the EntityModel type
E - the EntityEditModel type
T - the EntityTableModel type
R - the EntityEditor type
All Known Implementing Classes:
AbstractEntityApplicationModel, SwingEntityApplicationModel

public interface EntityApplicationModel<M extends EntityModel<M,E,T,R>,E extends EntityEditModel<R>,T extends EntityTableModel<E,R>,R extends EntityEditor<R>>
A central application model, coordinating the EntityModel instances of an application.
  • Field Details

    • USER_PREFERENCES

      static final PropertyValue<Boolean> USER_PREFERENCES
      Specifies whether the client should apply and save user preferences
      • Value type: Boolean
      • Default value: true
    • PREFERENCES_KEY

      static final PropertyValue<String> PREFERENCES_KEY
      Specifies the key to use when creating file based application preferences. Note that this string may only contain valid filename characters and symbols.
      • Value type: String
      • Default value: null
  • Method Details

    • user

      User user()
      Returns:
      the current user
    • connectionProvider

      EntityConnectionProvider connectionProvider()
      Returns:
      the EntityConnectionProvider instance being used by this EntityApplicationModel
    • 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 application model
    • entities

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

      Returns:
      the EntityApplicationModel.EntityModels
    • store

      void store(Preferences preferences)
      Stores the model-owned persistent state of this application's model tree to the given preferences node. Each root model stores its state under a child node named by its EntityModel.preferencesKey(). May be overridden to persist custom state, in which case super.store(preferences) should be called in order to retain the default state.
      Parameters:
      preferences - the preferences node representing the entity models
      See Also:
    • restore

      void restore(Preferences preferences)
      Restores the model-owned persistent state of this application's model tree from the given preferences node. Each root model restores its state from a child node named by its EntityModel.preferencesKey().
      Parameters:
      preferences - the preferences node representing the entity models
      See Also: