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

Type Parameters:
M - the type of EntityModel this application model is based on
E - the type of EntityEditModel used by this EntityModel
T - the type of EntityTableModel used by this EntityModel
All Known Implementing Classes:
DefaultEntityApplicationModel, SwingEntityApplicationModel

public interface EntityApplicationModel<M extends EntityModel<M,E,T>,E extends EntityEditModel,T extends EntityTableModel<E>>
A central application model class.
  • Field Details

    • SAVE_DEFAULT_USERNAME

      static final PropertyValue<Boolean> SAVE_DEFAULT_USERNAME
      Specifies whether the client saves the last successful login username, which is then displayed as the default username the next time the application is started
      • Value type: Boolean
      • Default value: true
    • USER

      static final PropertyValue<String> USER
      Specifies the user for logging into the application on the form user:password. If one is specified no login dialog is presented.

      Initialized with the value of the CODION_CLIENT_USER environment variable.

      Warning: System properties are visible in process listings. Use only for development/testing. In production, use secure credential management.

      • Value type: String
      • Default value: System.getenv("CODION_CLIENT_USER")
      See Also:
    • USER_PREFERENCES

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

      static final PropertyValue<Boolean> RESTORE_DEFAULT_PREFERENCES
      Specifies whether the application should restore default preferences, that is, not load any saved user preferences.
      • Value type: Boolean
      • Default value: false
    • 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
    • version

      Optional<Version> version()
      Returns:
      the application version, an empty Optional in case no version information is available
    • entities

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

      Returns:
      the EntityApplicationModel.EntityModels
    • preferences

      Preferences preferences()
      Returns:
      the application preferences instance
      See Also:
    • refresh

      void refresh()
      Refreshes all data models contained in this application model