Interface SqmNegatablePredicate
-
- All Superinterfaces:
jakarta.persistence.criteria.Expression<Boolean>,JpaCriteriaNode,JpaExpression<Boolean>,JpaPredicate,JpaSelection<Boolean>,JpaTupleElement<Boolean>,jakarta.persistence.criteria.Predicate,jakarta.persistence.criteria.Selection<Boolean>,Serializable,SqmExpressibleAccessor<Boolean>,SqmExpression<Boolean>,SqmNode,SqmPredicate,SqmSelectableNode<Boolean>,SqmTypedNode<Boolean>,SqmVisitableNode,jakarta.persistence.TupleElement<Boolean>
- All Known Subinterfaces:
SqmInPredicate<T>
- All Known Implementing Classes:
AbstractNegatableSqmPredicate,SqmBetweenPredicate,SqmBooleanExpressionPredicate,SqmComparisonPredicate,SqmEmptinessPredicate,SqmExistsPredicate,SqmInListPredicate,SqmInSubQueryPredicate,SqmLikePredicate,SqmMemberOfPredicate,SqmNegatedPredicate,SqmNullnessPredicate
public interface SqmNegatablePredicate extends SqmPredicate
Contract for predicates that have a negated form, e.g.x is not nullas opposed tonot(x is null)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisNegated()Is this predicate (currently) negated?voidnegate()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 org.hibernate.query.sqm.tree.expression.SqmExpression
applyInferableType, as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, castAs, 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.SqmTypedNode
getExpressible, getNodeJavaType
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
accept, appendHqlString, toHqlString
-
-
-
-
Method Detail
-
isNegated
boolean isNegated()
Is this predicate (currently) negated?- Specified by:
isNegatedin interfacejakarta.persistence.criteria.Predicate- Returns:
trueif we have a negated form currently
-
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.
-
-