Interface SqmNegatablePredicate
- All Superinterfaces:
Expression<Boolean>, JpaCriteriaNode, JpaExpression<Boolean>, JpaPredicate, JpaSelection<Boolean>, JpaTupleElement<Boolean>, Predicate, Selection<Boolean>, Serializable, SqmCacheable, 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, 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 Predicate
Predicate.BooleanOperator -
Field Summary
-
Method Summary
Methods inherited from interface JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface JpaTupleElement
getJavaType, getJavaTypeName, isEnumMethods inherited from interface Predicate
getExpressions, getOperatorMethods inherited from interface Selection
isCompoundSelectionMethods inherited from interface SqmCacheable
cacheHashCode, isCompatibleMethods inherited from interface SqmExpression
applyInferableType, as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, cast, castAs, equalTo, equalTo, in, in, in, in, isNotNull, isNull, notEqualTo, notEqualTo, visitSubSelectableNodesMethods inherited from interface SqmNode
asLoggableText, nodeBuilderMethods inherited from interface SqmPredicate
copy, getExpressible, getJavaTypeDescriptor, getNodeJavaType, getNodeType, notMethods inherited from interface SqmSelectableNode
getTupleLengthMethods inherited from interface SqmVisitableNode
accept, appendHqlString, toHqlStringMethods inherited from interface TupleElement
getAlias
-
Method Details
-
isNegated
-
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.
-