Package is.codion.swing.framework.model
Class SwingEntityConditions
java.lang.Object
is.codion.framework.model.EntityConditions
is.codion.swing.framework.model.SwingEntityConditions
- All Implemented Interfaces:
Supplier<Map<Attribute<?>,ConditionModel<?>>>
A Swing
ConditionModel supplier using SwingEntityComboBoxModel for the EQUAL and IN operands
of foreign keys based on small datasets-
Constructor Summary
ConstructorsConstructorDescriptionSwingEntityConditions(EntityType entityType, EntityConnection connection) Instantiates a newSwingEntityConditions. -
Method Summary
Modifier and TypeMethodDescriptionprotected ForeignKeyConditionModelcondition(ForeignKey foreignKey) Only called ifEntityConditions.include(ForeignKey)returns trueprotected SwingEntityComboBoxModelcreateEqualComboBoxModel(ForeignKey foreignKey) protected SwingEntityComboBoxModelcreateInComboBoxModel(ForeignKey foreignKey) Note that this must be a separate instance from the one returned bycreateEqualComboBoxModel(ForeignKey), since the EQUAL and IN operand components exist side by side.Methods inherited from class is.codion.framework.model.EntityConditions
condition, connection, createEqualSearchModel, createInSearchModel, definition, definition, get, include, include
-
Constructor Details
-
SwingEntityConditions
Instantiates a newSwingEntityConditions.- Parameters:
entityType- the entity typeconnection- the connection
-
-
Method Details
-
condition
Description copied from class:EntityConditionsOnly called ifEntityConditions.include(ForeignKey)returns true- Overrides:
conditionin classEntityConditions- Parameters:
foreignKey- the foreign key- Returns:
- a
ForeignKeyConditionModelbased on the given foreign key
-
createEqualComboBoxModel
- Parameters:
foreignKey- the foreign key- Returns:
- a combo box model to use for the equal value
-
createInComboBoxModel
Note that this must be a separate instance from the one returned bycreateEqualComboBoxModel(ForeignKey), since the EQUAL and IN operand components exist side by side.- Parameters:
foreignKey- the foreign key- Returns:
- a combo box model to use for the in value
-