Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityEditModel<M extends EntityModel<M,E,T,R>,E extends EntityEditModel<M,E,T,R>,T extends EntityTableModel<M,E,T,R>,R extends EntityEditor>
- Type Parameters:
M- theEntityModeltypeE- theEntityEditModeltypeT- theEntityTableModeltypeR- theEntityEditortype
- All Known Implementing Classes:
DefaultEntityEditModel,SwingEntityEditModel
public interface EntityEditModel<M extends EntityModel<M,E,T,R>,E extends EntityEditModel<M,E,T,R>,T extends EntityTableModel<M,E,T,R>,R extends EntityEditor>
Specifies a class for editing an
Entity instance.
The underlying attribute values are available via EntityEditor.value(Attribute).- See Also:
-
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.editor()Returns aEntityEditorwrapping the entity being edited.entities()
-
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 aEntityEditorwrapping the entity being edited.EntityEditor.EditorEntity.get()returns an immutable copy of theEntityinstance being edited, whileEntityEditor.EditorEntity.set(Entity)copies the values from the givenEntityinto the underlyingEntity. Note that value changes must go through theEntityEditor.EditorValueaccessible viaEntityEditor.value(Attribute).- Returns:
- the
EntityEditorwrapping theEntityinstance being edited - See Also:
-
entities
Entities entities()- Returns:
- the underlying domain entities
-
entityDefinition
EntityDefinition entityDefinition()- Returns:
- the definition of the underlying entity
-