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 ofEntityModel
used for detail modelsE
- the type ofEntityEditModel
used by thisEntityModel
T
- the type ofEntityTableModel
used 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()
void
Adds the given detail model to this model.void
Adds the given detail model to this model, based on a fitting foreign key.void
Adds the given detail models to this model, based on a fitting foreign key.void
add
(M detailModel, ForeignKey foreignKey) Adds the given detail model to this model, based on the given foreign key.boolean
get()
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
- theModelLink
to 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
State
for the given detail model - Throws:
IllegalArgumentException
- in case this model does not contain the given detail model
-