Module is.codion.framework.model
Package is.codion.framework.model
Class DefaultEntityEditModel<R extends EntityEditor<R>>
java.lang.Object
is.codion.framework.model.DefaultEntityEditModel<R>
- Type Parameters:
R- theEntityEditortype
- All Implemented Interfaces:
EntityEditModel<R>
- Direct Known Subclasses:
SwingEntityEditModel
public class DefaultEntityEditModel<R extends EntityEditor<R>>
extends Object
implements EntityEditModel<R>
A default
EntityEditModel implementation-
Constructor Summary
ConstructorsConstructorDescriptionDefaultEntityEditModel(R editor) Instantiates a newDefaultEntityEditModelbased on the given editor -
Method Summary
Modifier and TypeMethodDescriptionfinal EntityConnectionDo not cache or keep the connection returned by this method in a long living field, since it may become invalid and thereby unusable.final EntityConnectionProviderfinal Reditor()Returns aEntityEditorwrapping the entity being edited.final Entitiesentities()final EntityDefinitionfinal EntityTypefinal StringtoString()
-
Constructor Details
-
DefaultEntityEditModel
Instantiates a newDefaultEntityEditModelbased on the given editor- Parameters:
editor- the editor
-
-
Method Details
-
entities
- Specified by:
entitiesin interfaceEntityEditModel<R extends EntityEditor<R>>- Returns:
- the underlying domain entities
-
entityDefinition
- Specified by:
entityDefinitionin interfaceEntityEditModel<R extends EntityEditor<R>>- Returns:
- the definition of the underlying entity
-
toString
-
entityType
- Specified by:
entityTypein interfaceEntityEditModel<R extends EntityEditor<R>>- Returns:
- the type of the entity this edit model is based on
-
connectionProvider
- Specified by:
connectionProviderin interfaceEntityEditModel<R extends EntityEditor<R>>- Returns:
- the connection provider used by this edit model
-
connection
Description copied from interface:EntityEditModelDo not cache or keep the connection returned by this method in a long living field, since it may become invalid and thereby unusable.- Specified by:
connectionin interfaceEntityEditModel<R extends EntityEditor<R>>- Returns:
- the connection used by this edit model
-
editor
Description copied from interface:EntityEditModelReturns 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).- Specified by:
editorin interfaceEntityEditModel<R extends EntityEditor<R>>- Returns:
- the
EntityEditorwrapping theEntityinstance being edited - See Also:
-