Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityEditor.ComponentModels
- All Known Implementing Classes:
DefaultEntityEditor.DefaultComponentModels,SwingEntityEditor.SwingComponentModels
- Enclosing interface:
EntityEditor
public static interface EntityEditor.ComponentModels
Provides models for editor components requiring database access.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidconfigure(ForeignKey foreignKey, EntitySearchModel entitySearchModel, EntityEditor editor) Called when aEntitySearchModelis created inEntityEditor.SearchModels.get(ForeignKey).createSearchModel(ForeignKey foreignKey, EntityEditor editor) Creates aEntitySearchModelfor looking up entities of the type referenced by the given foreign key, using the search attributes defined for that entity type.
-
Method Details
-
createSearchModel
Creates a
EntitySearchModelfor looking up entities of the type referenced by the given foreign key, using the search attributes defined for that entity type.- Parameters:
foreignKey- the foreign key for which to create aEntitySearchModeleditor- the editor- Returns:
- a new
EntitySearchModelfor looking up entities of the type referenced by the given foreign key attribute, - Throws:
IllegalStateException- in case no searchable attributes can be found for the entity type referenced by the given foreign key
-
configure
default void configure(ForeignKey foreignKey, EntitySearchModel entitySearchModel, EntityEditor editor) Called when a
EntitySearchModelis created inEntityEditor.SearchModels.get(ForeignKey).- Parameters:
foreignKey- the foreign keyentitySearchModel- the search modeleditor- the editor
-