Module is.codion.framework.model
Package is.codion.framework.model
Class EntityConditionModelFactory
java.lang.Object
is.codion.framework.model.EntityConditionModelFactory
- All Implemented Interfaces:
Supplier<Map<Attribute<?>,ConditionModel<?>>>
- Direct Known Subclasses:
SwingEntityConditionModelFactory
public class EntityConditionModelFactory
extends Object
implements Supplier<Map<Attribute<?>,ConditionModel<?>>>
A default
ConditionModel factory for Entity based condition models.-
Constructor Summary
ConstructorsConstructorDescriptionEntityConditionModelFactory(EntityType entityType, EntityConnectionProvider connectionProvider) Instantiates a newEntityConditionModelFactory. -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> ConditionModel<T> conditionModel(Column<T> column) Only called ifinclude(Column)returns trueprotected ForeignKeyConditionModelconditionModel(ForeignKey foreignKey) Only called ifinclude(ForeignKey)returns trueprotected final EntityConnectionProviderprotected EntitySearchModelcreateEqualSearchModel(ForeignKey foreignKey) protected EntitySearchModelcreateInSearchModel(ForeignKey foreignKey) protected final EntityDefinitionprotected final EntityDefinitiondefinition(EntityType entityType) final Map<Attribute<?>, ConditionModel<?>> get()protected booleanprotected booleaninclude(ForeignKey foreignKey)
-
Constructor Details
-
EntityConditionModelFactory
public EntityConditionModelFactory(EntityType entityType, EntityConnectionProvider connectionProvider) Instantiates a newEntityConditionModelFactory.- Parameters:
entityType- the entity typeconnectionProvider- the connection provider
-
-
Method Details
-
get
- Specified by:
getin interfaceSupplier<Map<Attribute<?>,ConditionModel<?>>>
-
include
- Parameters:
column- the column- Returns:
- true if a condition model should be included for the given column
-
include
- Parameters:
foreignKey- the foreign key- Returns:
- true if a condition model should be included for the given foreign key
-
conditionModel
Only called ifinclude(Column)returns true- Type Parameters:
T- the column type- Parameters:
column- the column- Returns:
- a
ConditionModelbased on the given column
-
conditionModel
Only called ifinclude(ForeignKey)returns true- Parameters:
foreignKey- the foreign key- Returns:
- a
ForeignKeyConditionModelbased on the given foreign key
-
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
- Returns:
- the underlying
EntityDefinition
-
definition
- Parameters:
entityType- the entity type- Returns:
- the definition of the given type
-