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
public interface SqmNegatablePredicate extends SqmPredicate
Contract for predicates that have a negated form, e.g.x is not null
as opposed tonot(x is null)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jakarta.persistence.criteria.Predicate
Predicate.BooleanOperator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isNegated()
Is this predicate (currently) negated?void
negate()
Apply an external negation.-
Methods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItems
-
Methods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType
-
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, castAs, equalTo, equalTo, getNodeType, in, in, in, in, isNotNull, isNull, 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 Detail
-
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.
-
-