Interface SqmNegatablePredicate
- All Superinterfaces:
Expression<Boolean>
,JpaCriteriaNode
,JpaExpression<Boolean>
,JpaPredicate
,JpaSelection<Boolean>
,JpaTupleElement<Boolean>
,Predicate
,Selection<Boolean>
,Serializable
,SqmExpressibleAccessor<Boolean>
,SqmExpression<Boolean>
,SqmNode
,SqmPredicate
,SqmSelectableNode<Boolean>
,SqmTypedNode<Boolean>
,SqmVisitableNode
,TupleElement<Boolean>
- All Known Subinterfaces:
SqmInPredicate<T>
- All Known Implementing Classes:
AbstractNegatableSqmPredicate
,SqmBetweenPredicate
,SqmBooleanExpressionPredicate
,SqmComparisonPredicate
,SqmEmptinessPredicate
,SqmExistsPredicate
,SqmInListPredicate
,SqmInSubQueryPredicate
,SqmLikePredicate
,SqmMemberOfPredicate
,SqmNegatedPredicate
,SqmNullnessPredicate
,SqmTruthnessPredicate
Contract for predicates that have a negated form, e.g.
x is not null
as opposed to not(x is null)
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.persistence.criteria.Predicate
Predicate.BooleanOperator
-
Field Summary
-
Method Summary
Methods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItems
Methods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeName, isEnum
Methods inherited from interface jakarta.persistence.criteria.Predicate
getExpressions, getOperator
Methods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelection
Methods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
applyInferableType, as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, cast, castAs, equalTo, equalTo, getNodeType, in, in, in, in, isNotNull, isNull, notEqualTo, notEqualTo, visitSubSelectableNodes
Methods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilder
Methods inherited from interface org.hibernate.query.sqm.tree.predicate.SqmPredicate
copy, getJavaTypeDescriptor, not
Methods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLength
Methods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaType
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
accept, appendHqlString, toHqlString
Methods inherited from interface jakarta.persistence.TupleElement
getAlias
-
Method Details
-
isNegated
boolean isNegated()Is this predicate (currently) negated? -
negate
void negate()Apply an external negation. Called when we encounter aNOT
grouping.For example, for
not(x is null)
we build theSqmNullnessPredicate
and then call its negate method which results inx is not null
.Can be applied nested as well. For example,
not(not(x is null))
becomesx is null
because the double-negative cancel each other out.
-