Class AbstractNegatableSqmPredicate
- java.lang.Object
-
- org.hibernate.query.sqm.tree.AbstractSqmNode
-
- org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement<T>
-
- org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection<T>
-
- org.hibernate.query.sqm.tree.expression.AbstractSqmExpression<Boolean>
-
- org.hibernate.query.sqm.tree.predicate.AbstractSqmPredicate
-
- org.hibernate.query.sqm.tree.predicate.AbstractNegatableSqmPredicate
-
- All Implemented Interfaces:
jakarta.persistence.criteria.Expression<Boolean>
,jakarta.persistence.criteria.Predicate
,jakarta.persistence.criteria.Selection<Boolean>
,jakarta.persistence.TupleElement<Boolean>
,Serializable
,JpaCriteriaNode
,JpaExpression<Boolean>
,JpaPredicate
,JpaSelection<Boolean>
,JpaTupleElement<Boolean>
,SqmExpression<Boolean>
,SqmNegatablePredicate
,SqmPredicate
,SqmSelectableNode<Boolean>
,SqmExpressibleAccessor<Boolean>
,SqmNode
,SqmTypedNode<Boolean>
,SqmVisitableNode
- Direct Known Subclasses:
SqmBetweenPredicate
,SqmBooleanExpressionPredicate
,SqmComparisonPredicate
,SqmEmptinessPredicate
,SqmExistsPredicate
,SqmInListPredicate
,SqmInSubQueryPredicate
,SqmLikePredicate
,SqmMemberOfPredicate
,SqmNegatedPredicate
,SqmNullnessPredicate
public abstract class AbstractNegatableSqmPredicate extends AbstractSqmPredicate implements SqmNegatablePredicate
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractNegatableSqmPredicate(boolean negated, NodeBuilder nodeBuilder)
AbstractNegatableSqmPredicate(NodeBuilder nodeBuilder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract SqmNegatablePredicate
createNegatedNode()
boolean
isNegated()
Is this predicate (currently) negated?void
negate()
Apply an external negation.SqmNegatablePredicate
not()
-
Methods inherited from class org.hibernate.query.sqm.tree.predicate.AbstractSqmPredicate
getExpressions, getOperator
-
Methods inherited from class org.hibernate.query.sqm.tree.expression.AbstractSqmExpression
alias, applyInferableType, as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, getJavaTypeDescriptor, in, in, in, in, internalApplyInferableType, isNotNull, isNull, nodeBuilder
-
Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
getSelectionItems, isCompoundSelection
-
Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, getNodeType, setAlias, setExpressibleType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
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
-
-
-
-
Constructor Detail
-
AbstractNegatableSqmPredicate
public AbstractNegatableSqmPredicate(NodeBuilder nodeBuilder)
-
AbstractNegatableSqmPredicate
public AbstractNegatableSqmPredicate(boolean negated, NodeBuilder nodeBuilder)
-
-
Method Detail
-
isNegated
public boolean isNegated()
Description copied from interface:SqmNegatablePredicate
Is this predicate (currently) negated?- Specified by:
isNegated
in interfacejakarta.persistence.criteria.Predicate
- Specified by:
isNegated
in interfaceSqmNegatablePredicate
- Returns:
true
if we have a negated form currently
-
negate
public void negate()
Description copied from interface:SqmNegatablePredicate
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.- Specified by:
negate
in interfaceSqmNegatablePredicate
-
createNegatedNode
protected abstract SqmNegatablePredicate createNegatedNode()
-
not
public SqmNegatablePredicate not()
- Specified by:
not
in interfaceJpaPredicate
- Specified by:
not
in interfacejakarta.persistence.criteria.Predicate
- Specified by:
not
in interfaceSqmPredicate
-
-