java.lang.Object
is.codion.framework.model.EntityConditions
- All Implemented Interfaces:
Supplier<Map<Attribute<?>,ConditionModel<?>>>
- Direct Known Subclasses:
SwingEntityConditions
public class EntityConditions
extends Object
implements Supplier<Map<Attribute<?>,ConditionModel<?>>>
A default
ConditionModel factory for Entity based condition models.-
Constructor Summary
ConstructorsConstructorDescriptionEntityConditions(EntityType entityType, EntityConnectionProvider connectionProvider) Instantiates a newEntityConditions. -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> ConditionModel<T> Only called ifinclude(Column)returns trueprotected ForeignKeyConditionModelcondition(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
-
EntityConditions
Instantiates a newEntityConditions.- 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
-
condition
Only called ifinclude(Column)returns true- Type Parameters:
T- the column type- Parameters:
column- the column- Returns:
- a
ConditionModelbased on the given column
-
condition
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
-