- All Superinterfaces:
TableConditionModel<Attribute<?>>
Manages the condition models associated with an entity's attributes, providing the combined
WHERE and HAVING conditions used when querying entities.
Use
builder() for an instance.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceManages the additional WHERE and HAVING conditions.static interfaceBuilds anEntityConditionModelstatic interfaceManages an additional condition supplier.static interfaceIndicates if the condition has changed since the last call toEntityConditionModel.Modified.reset() -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue<Boolean> Specifies whether the negative operatorsOperator.NOT_EQUALandOperator.NOT_INinclude null values when translated to a query condition, matching exactly the rows their positive counterparts do not, the way aConditionModelused as a filter does. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()DefaultConjunction.AND<T> ConditionModel<T> Returns theConditionModelassociated with the given column.get(ForeignKey foreignKey) Returns theConditionModelassociated with the given foreignKey.having()Returns a HAVING condition based on enabled condition models which are based on aggregate function columns.modified()where()Returns a WHERE condition based on enabled condition models which are based on non-aggregate function columns.
-
Field Details
-
NEGATION_INCLUDES_NULL
Specifies whether the negative operatorsOperator.NOT_EQUALandOperator.NOT_INinclude null values when translated to a query condition, matching exactly the rows their positive counterparts do not, the way aConditionModelused as a filter does. If false the condition follows SQL, where no comparison to null holds, excluding rows without a value. Note that this only affects conditions based on nullable columns and foreign keys, and only the conditions created by this model, conditions created viaColumnandForeignKeyare always plain SQL.- Value type: Boolean
- Default value: true
- See Also:
-
-
Method Details
-
entityType
EntityType entityType()- Returns:
- the type of the entity this table condition model is based on
-
connection
EntityConnection connection()- Returns:
- the connection
-
where
Condition where()Returns a WHERE condition based on enabled condition models which are based on non-aggregate function columns. Uses the conjunction managed byconjunction()- Returns:
- the current WHERE condition based on the state of the underlying condition models
-
having
Condition having()Returns a HAVING condition based on enabled condition models which are based on aggregate function columns. Uses the conjunction managed byconjunction()- Returns:
- the current HAVING condition based on the state of the underlying condition models
-
conjunction
Value<Conjunction> conjunction()DefaultConjunction.AND- Returns:
- the
Valuemanaging the conjunction to use in case of multiple conditions
-
get
Returns theConditionModelassociated with the given column.- Type Parameters:
T- the column value type- Parameters:
column- the column for which to retrieve theConditionModel- Returns:
- the
ConditionModelassociated withcolumn - Throws:
IllegalArgumentException- in case no condition model exists for the given column
-
get
Returns theConditionModelassociated with the given foreignKey.- Parameters:
foreignKey- the foreignKey for which to retrieve theConditionModel- Returns:
- the
ConditionModelassociated withforeignKey - Throws:
IllegalArgumentException- in case no condition model exists for the given foreignKey
-
additional
EntityConditionModel.AdditionalConditions additional()- Returns:
- the
EntityConditionModel.AdditionalConditionsinstance, for managing additional conditions
-
modified
EntityConditionModel.Modified modified()- Returns:
- the
EntityConditionModel.Modifiedinstance - See Also:
-
builder
- Returns:
- a
EntityConditionModel.Builder.EntityTypeStep
-