Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityEditor.SearchModels
- Enclosing interface:
EntityEditor
public static interface EntityEditor.SearchModels
Manages the
EntitySearchModels used by a EntityEditModel-
Method Summary
Modifier and TypeMethodDescriptioncreate(ForeignKey foreignKey) Creates aEntitySearchModelfor looking up entities of the type referenced by the given foreign key, using the search attributes defined for that entity type.get(ForeignKey foreignKey) Returns theEntitySearchModelassociated with the given foreign key.
-
Method Details
-
get
Returns the
EntitySearchModelassociated with the given foreign key. If no such search model exists, one is created by callingcreate(ForeignKey).This method always returns the same
EntitySearchModelinstance, once one has been created.- Parameters:
foreignKey- the foreign key for which to retrieve theEntitySearchModel- Returns:
- the
EntitySearchModelassociated with the given foreign key
-
create
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 aEntitySearchModel- 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
-