Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityModel.DetailModels<M extends EntityModel<M,E,T>,E extends EntityEditModel,T extends EntityTableModel<E>>
- Type Parameters:
M- the type ofEntityModelused for detail modelsE- the type ofEntityEditModelused by thisEntityModelT- the type ofEntityTableModelused by thisEntityModel
- Enclosing interface:
EntityModel<M extends EntityModel<M,E, T>, E extends EntityEditModel, T extends EntityTableModel<E>>
public static interface EntityModel.DetailModels<M extends EntityModel<M,E,T>,E extends EntityEditModel,T extends EntityTableModel<E>>
Manages the detail models for a
EntityModel-
Method Summary
Modifier and TypeMethodDescriptionactive()voidAdds the given detail model to this model.voidAdds the given detail model to this model, based on a fitting foreign key.voidAdds the given detail models to this model, based on a fitting foreign key.voidadd(M detailModel, ForeignKey foreignKey) Adds the given detail model to this model, based on the given foreign key.booleanget()get(EntityType entityType) Returns a detail model of the given type<C extends M>
CReturns the first detail model of the given type
-
Method Details
-
get
- Returns:
- an unmodifiable view of the detail models this model contains
-
active
ObservableValueSet<M> active()- Returns:
- the active detail models, that is, those that should respond to master model selection events
- See Also:
-
add
Adds the given detail models to this model, based on a fitting foreign key.
Note that if a detail model contains a table model it is configured so that a query condition is required for it to show any data, via
EntityQueryModel.conditionRequired()- Parameters:
detailModels- the detail models to add- Throws:
IllegalArgumentException- in case zero or multiple fitting foreign keys are found
-
add
Adds the given detail model to this model, based on a fitting foreign key.
Note that if the detail model contains a table model it is configured so that a query condition is required for it to show any data, via
EntityQueryModel.conditionRequired()- Parameters:
detailModel- the detail model- Throws:
IllegalArgumentException- in case zero or multiple fitting foreign keys are found
-
add
Adds the given detail model to this model, based on the given foreign key.Note that if the detail model contains a table model it is configured so that a query condition is required for it to show any data, via
EntityQueryModel.conditionRequired()- Parameters:
detailModel- the detail modelforeignKey- the foreign key to base the detail model link on
-
add
Adds the given detail model to this model.- Parameters:
modelLink- theModelLinkto add- Throws:
IllegalArgumentException- in case the model has already been added
-
contains
- Parameters:
detailModel- the detail model- Returns:
- true if this model contains the given detail model
-
get
Returns the first detail model of the given type- Type Parameters:
C- the model type- Parameters:
modelClass- the type of the requiredEntityModel- Returns:
- the detail model of type
entityModelClass - Throws:
IllegalArgumentException- in case this model does not contain a detail model of the given type
-
get
Returns a detail model of the given type- Parameters:
entityType- the entityType of the required EntityModel- Returns:
- the detail model of type
entityModelClass - Throws:
IllegalArgumentException- in case this model does not contain a detail model for the entityType
-
active
- Parameters:
detailModel- the detail model- Returns:
- the active
Statefor the given detail model - Throws:
IllegalArgumentException- in case this model does not contain the given detail model
-