Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityApplicationModel<M extends EntityModel<M,E,T,R>,E extends EntityEditModel<M,E,T,R>,T extends EntityTableModel<M,E,T,R>,R extends EntityEditor<M,E,T,R>>
- Type Parameters:
M- theEntityModeltypeE- theEntityEditModeltypeT- theEntityTableModeltypeR- theEntityEditortype
- All Known Implementing Classes:
DefaultEntityApplicationModel,SwingEntityApplicationModel
public interface EntityApplicationModel<M extends EntityModel<M,E,T,R>,E extends EntityEditModel<M,E,T,R>,T extends EntityTableModel<M,E,T,R>,R extends EntityEditor<M,E,T,R>>
A central application model class.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceEntityApplicationModel.EntityModels<M extends EntityModel<M,E, T, R>, E extends EntityEditModel<M, E, T, R>, T extends EntityTableModel<M, E, T, R>, R extends EntityEditor<M, E, T, R>> Manages theEntityModels for aEntityApplicationModel -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue<String> Specifies the key to use when creating file based application preferences.static final PropertyValue<Boolean> Specifies whether the client should apply and save user preferences Value type: Boolean Default value: true -
Method Summary
Modifier and TypeMethodDescriptionDo not cache or keep the connection returned by this method in a long living field, since it may become invalid and thereby unusable.entities()Returns file-based preferences using the domain name as identifier orPREFERENCES_KEYif specified.user()
-
Field Details
-
USER_PREFERENCES
Specifies whether the client should apply and save user preferences- Value type: Boolean
- Default value: true
-
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
-
entityModels
EntityApplicationModel.EntityModels<M,E, entityModels()T, R> - Returns:
- the
EntityApplicationModel.EntityModels
-
preferences
Preferences preferences()Returns file-based preferences using the domain name as identifier orPREFERENCES_KEYif specified. This is used for the hierarchical JSON preferences format.- Returns:
- the application preferences instance
- See Also:
-