Module is.codion.framework.model
Package is.codion.framework.model
Class AttributeConditionModelFactory
java.lang.Object
is.codion.framework.model.AttributeConditionModelFactory
- All Implemented Interfaces:
TableConditionModel.ConditionModelFactory<Attribute<?>>
- Direct Known Subclasses:
SwingAttributeConditionModelFactory
public class AttributeConditionModelFactory
extends Object
implements TableConditionModel.ConditionModelFactory<Attribute<?>>
A default
TableConditionModel.ConditionModelFactory
implementation for creating Entity based column condition models.-
Constructor Summary
ConstructorDescriptionAttributeConditionModelFactory
(EntityConnectionProvider connectionProvider) Instantiates a newAttributeConditionModelFactory
. -
Method Summary
Modifier and TypeMethodDescriptionprotected final EntityConnectionProvider
Creates aConditionModel
for a given column identifierprotected EntitySearchModel
createEqualSearchModel
(ForeignKey foreignKey) protected EntitySearchModel
createInSearchModel
(ForeignKey foreignKey) protected final EntityDefinition
definition
(EntityType entityType)
-
Constructor Details
-
AttributeConditionModelFactory
Instantiates a newAttributeConditionModelFactory
.- Parameters:
connectionProvider
- the connection provider
-
-
Method Details
-
create
Description copied from interface:TableConditionModel.ConditionModelFactory
Creates aConditionModel
for a given column identifier- Specified by:
create
in interfaceTableConditionModel.ConditionModelFactory<Attribute<?>>
- Parameters:
attribute
- the column identifier for which to create aConditionModel
- Returns:
- a
ConditionModel
for the given identifier or an empty optional if none is provided
-
createEqualSearchModel
- Parameters:
foreignKey
- the foreign key- Returns:
- a search model to use for the equal value
-
createInSearchModel
- Parameters:
foreignKey
- the foreign key- Returns:
- a search model to use for the in values
-
connectionProvider
- Returns:
- the underlying connection provider
-
definition
- Parameters:
entityType
- the entity type- Returns:
- the entity definition
-