Module is.codion.framework.model
Package is.codion.framework.model
Class AbstractEntityEditModel<R extends EntityEditor<R>>
java.lang.Object
is.codion.framework.model.AbstractEntityEditModel<R>
- Type Parameters:
R- theEntityEditortype
- All Implemented Interfaces:
EntityEditModel<R>
- Direct Known Subclasses:
SwingEntityEditModel
public abstract class AbstractEntityEditModel<R extends EntityEditor<R>>
extends Object
implements EntityEditModel<R>
An abstract
EntityEditModel implementation.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractEntityEditModel(R editor) Instantiates a newAbstractEntityEditModelbased 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()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface is.codion.framework.model.EntityEditModel
restore, store
-
Constructor Details
-
AbstractEntityEditModel
Instantiates a newAbstractEntityEditModelbased 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:
-