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, getSelectionItemsMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeName, isEnumMethods inherited from interface jakarta.persistence.criteria.Predicate
getExpressions, getOperatorMethods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelectionMethods 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, visitSubSelectableNodesMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilderMethods inherited from interface org.hibernate.query.sqm.tree.predicate.SqmPredicate
copy, getJavaTypeDescriptor, notMethods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLengthMethods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaTypeMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
accept, appendHqlString, toHqlStringMethods 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 aNOTgrouping.For example, for
not(x is null)we build theSqmNullnessPredicateand 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 nullbecause the double-negative cancel each other out.
-