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 null
as opposed tonot(x is null)
-
-
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 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:
isNegated
in interfacejakarta.persistence.criteria.Predicate
- Returns:
true
if we have a negated form currently
-
negate
void negate()
Apply an external negation. Called when we encounter aNOT
grouping. For example, fornot(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.
-
-