Module is.codion.framework.model
Package is.codion.framework.model
Interface ForeignKeyConditionModel.Builder
- Enclosing interface:
ForeignKeyConditionModel
public static interface ForeignKeyConditionModel.Builder
A builder for a
ForeignKeyConditionModel.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe second step in building aForeignKeyConditionModelstatic interfaceThe first step in building aForeignKeyConditionModel -
Method Summary
Modifier and TypeMethodDescriptionbuild()comboBoxModel(Supplier<EntityComboBoxModel> comboBoxModel) Supplies the combo box models, called once per operand, on first access, a separate instance per operand.Sets the initial operator, the oneAttributeConditionModel.clear()reverts to.Sets the available operators, a subset ofOperator.EQUAL,Operator.NOT_EQUAL,Operator.INandOperator.NOT_IN, which is the default.searchModel(Supplier<EntitySearchModel> searchModel) Supplies the search models, called once per operand, on first access, a separate instance per operand.
-
Method Details
-
comboBoxModel
Supplies the combo box models, called once per operand, on first access, a separate instance per operand. Defaults to a combo box model of the referenced entities, including null.- Parameters:
comboBoxModel- supplies the combo box models- Returns:
- this builder
- See Also:
-
searchModel
Supplies the search models, called once per operand, on first access, a separate instance per operand. Defaults to a search model of the referenced entities.- Parameters:
searchModel- supplies the search models- Returns:
- this builder
- See Also:
-
operators
Sets the available operators, a subset ofOperator.EQUAL,Operator.NOT_EQUAL,Operator.INandOperator.NOT_IN, which is the default.- Parameters:
operators- the available operators- Returns:
- this builder
- Throws:
IllegalArgumentException- in case of an empty list or an operator not supported by a foreign key condition
-
operator
Sets the initial operator, the oneAttributeConditionModel.clear()reverts to. Defaults to the first of the availableoperators(List).- Parameters:
operator- the initial operator, must be one of the available operators- Returns:
- this builder
-
caption
- Parameters:
caption- the caption to associate with the condition model, the foreign key caption for example- Returns:
- this builder
- See Also:
-
build
ForeignKeyConditionModel build()- Returns:
- a new
ForeignKeyConditionModelinstance - Throws:
IllegalArgumentException- in case the initial operator is not one of the available operators
-