Module is.codion.framework.model
Package is.codion.framework.model
Interface ForeignKeyConditionModel
- All Superinterfaces:
AttributeConditionModel<Entity>,ConditionModel<Entity>
A foreign key condition model. The
Operator.EQUAL and Operator.IN operand components are each based on
either a EntitySearchModel or a EntityComboBoxModel.
The operands are plain values, independent of these models, a component based on a model must be linked to the
operand it edits, ConditionModel.Operands.equal() or ConditionModel.Operands.in(). Entities of the referenced type updated or deleted
are replaced in, or removed from, the operands, via PersistenceEvents.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface is.codion.common.model.condition.ConditionModel
ConditionModel.Operands<T>, ConditionModel.SetCondition<T>, ConditionModel.Wildcard -
Field Summary
Fields inherited from interface is.codion.common.model.condition.ConditionModel
AUTO_ENABLE, CASE_SENSITIVE, WILDCARD, WILDCARD_CHARACTER -
Method Summary
Modifier and TypeMethodDescriptionbuilder(ForeignKey foreignKey) Note that the selection of this combo box model is not the EQUAL operand, a component based on it must be linked toConditionModel.Operands.equal().Note that the selection of this search model is not the EQUAL operand, a component based on it must be linked toConditionModel.Operands.equal().Note that the selection of this combo box model is not the IN operand, a component based on it must be linked toConditionModel.Operands.in().Note that the selection of this search model is not the IN operand, a component based on it must be linked toConditionModel.Operands.in().Methods inherited from interface is.codion.framework.model.AttributeConditionModel
accepts, autoEnable, caseSensitive, clear, condition, dateTimePattern, enabled, format, locked, operands, operator, operators, set, valueClassMethods inherited from interface is.codion.common.model.condition.ConditionModel
caption, changed
-
Method Details
-
attribute
ForeignKey attribute()- Specified by:
attributein interfaceAttributeConditionModel<Entity>- Returns:
- the attribute
-
equalSearchModel
Optional<EntitySearchModel> equalSearchModel()Note that the selection of this search model is not the EQUAL operand, a component based on it must be linked toConditionModel.Operands.equal().- Returns:
- the
EntitySearchModelto base the EQUAL operand component on, an emptyOptionalif the EQUAL operand is not based on a search model
-
equalComboBoxModel
Optional<EntityComboBoxModel> equalComboBoxModel()Note that the selection of this combo box model is not the EQUAL operand, a component based on it must be linked toConditionModel.Operands.equal().- Returns:
- the
EntityComboBoxModelto base the EQUAL operand component on, an emptyOptionalif the EQUAL operand is not based on a combo box model
-
inSearchModel
Optional<EntitySearchModel> inSearchModel()Note that the selection of this search model is not the IN operand, a component based on it must be linked toConditionModel.Operands.in(). The selection being the value pending in that component, a second IN component for the same condition requires a search model of its own.- Returns:
- the
EntitySearchModelto base the IN operand component on, an emptyOptionalif the IN operand is not based on a search model
-
inComboBoxModel
Optional<EntityComboBoxModel> inComboBoxModel()Note that the selection of this combo box model is not the IN operand, a component based on it must be linked toConditionModel.Operands.in(). The selection being the value pending in that component, a second IN component for the same condition requires a combo box model of its own.- Returns:
- the
EntityComboBoxModelto base the IN operand component on, an emptyOptionalif the IN operand is not based on a combo box model
-
builder
- Parameters:
foreignKey- the foreign key- Returns:
- a new
ForeignKeyConditionModel.Builder
-