Class AbstractNegatableSqmPredicate
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement<Boolean>
org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection<Boolean>
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:
Expression<Boolean>,Predicate,Selection<Boolean>,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,SqmTruthnessPredicate
public abstract class AbstractNegatableSqmPredicate
extends AbstractSqmPredicate
implements SqmNegatablePredicate
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.persistence.criteria.Predicate
Predicate.BooleanOperator -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractNegatableSqmPredicate(boolean negated, NodeBuilder nodeBuilder) AbstractNegatableSqmPredicate(NodeBuilder nodeBuilder) AbstractNegatableSqmPredicate(SqmBindableType<Boolean> type, boolean negated, NodeBuilder nodeBuilder) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract SqmNegatablePredicatebooleaninthashCode()booleanIs this predicate (currently) negated?voidnegate()Apply an external negation.not()Methods inherited from class org.hibernate.query.sqm.tree.predicate.AbstractSqmPredicate
getExpressions, getOperatorMethods inherited from class org.hibernate.query.sqm.tree.expression.AbstractSqmExpression
applyInferableType, as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, cast, equalTo, equalTo, getJavaTypeDescriptor, in, in, in, in, internalApplyInferableType, isNotNull, isNull, nodeBuilder, notEqualTo, notEqualToMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
alias, getSelectionItems, isCompoundSelectionMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, getNodeType, setAlias, setExpressibleTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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, getJavaTypeDescriptorMethods 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
-
Constructor Details
-
AbstractNegatableSqmPredicate
-
AbstractNegatableSqmPredicate
-
AbstractNegatableSqmPredicate
public AbstractNegatableSqmPredicate(SqmBindableType<Boolean> type, boolean negated, NodeBuilder nodeBuilder)
-
-
Method Details
-
isNegated
public boolean isNegated()Description copied from interface:SqmNegatablePredicateIs this predicate (currently) negated?- Specified by:
isNegatedin interfacePredicate- Specified by:
isNegatedin interfaceSqmNegatablePredicate- Returns:
trueif we have a negated form currently
-
negate
public void negate()Description copied from interface:SqmNegatablePredicateApply 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.- Specified by:
negatein interfaceSqmNegatablePredicate
-
createNegatedNode
-
not
- Specified by:
notin interfaceJpaPredicate- Specified by:
notin interfacePredicate- Specified by:
notin interfaceSqmPredicate
-
equals
-
hashCode
public int hashCode()
-