Top Fields Constructors Methods
org.hibernate.query.sqm.tree.predicate

public abstract Class AbstractNegatableSqmPredicate

extends AbstractSqmPredicate
implements SqmNegatablePredicate
Class Inheritance
All Implemented Interfaces
org.hibernate.query.sqm.tree.predicate.SqmNegatablePredicate, org.hibernate.query.sqm.tree.predicate.SqmPredicate, org.hibernate.query.sqm.tree.expression.SqmExpression, org.hibernate.query.criteria.JpaExpression, jakarta.persistence.criteria.Expression, jakarta.persistence.criteria.Selection, jakarta.persistence.TupleElement, org.hibernate.query.criteria.JpaSelection, org.hibernate.query.criteria.JpaTupleElement, org.hibernate.query.criteria.JpaCriteriaNode, java.io.Serializable, org.hibernate.query.sqm.tree.select.SqmSelectableNode, org.hibernate.query.sqm.tree.SqmTypedNode, org.hibernate.query.sqm.tree.SqmVisitableNode, org.hibernate.query.sqm.tree.SqmNode, org.hibernate.query.sqm.tree.SqmExpressibleAccessor, org.hibernate.query.criteria.JpaPredicate, jakarta.persistence.criteria.Predicate
Known Direct Subclasses
org.hibernate.query.sqm.tree.predicate.SqmBetweenPredicate, org.hibernate.query.sqm.tree.predicate.SqmBooleanExpressionPredicate, org.hibernate.query.sqm.tree.predicate.SqmComparisonPredicate, org.hibernate.query.sqm.tree.predicate.SqmEmptinessPredicate, org.hibernate.query.sqm.tree.predicate.SqmExistsPredicate, org.hibernate.query.sqm.tree.predicate.SqmInListPredicate, org.hibernate.query.sqm.tree.predicate.SqmInSubQueryPredicate, org.hibernate.query.sqm.tree.predicate.SqmLikePredicate, org.hibernate.query.sqm.tree.predicate.SqmMemberOfPredicate, org.hibernate.query.sqm.tree.predicate.SqmNegatedPredicate, org.hibernate.query.sqm.tree.predicate.SqmNullnessPredicate, org.hibernate.query.sqm.tree.predicate.SqmTruthnessPredicate
Imports
org.hibernate.query.sqm.NodeBuilder, .SqmExpressible

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private boolean

Constructor Summary

AccessConstructor and Description
public
public
AbstractNegatableSqmPredicate(boolean negated, NodeBuilder nodeBuilder)

public
AbstractNegatableSqmPredicate(SqmExpressible<Boolean> type, boolean negated, NodeBuilder nodeBuilder)

Method Summary

Modifier and TypeMethod and Description
protected abstract SqmNegatablePredicate
public boolean
public void
public SqmNegatablePredicate
not()

Implements org.hibernate.query.sqm.tree.predicate.SqmPredicate.not.

Create a negation of the predicate.
Inherited from org.hibernate.query.sqm.tree.predicate.AbstractSqmPredicate:
getExpressionsgetOperator

Field Detail

negatedback to summary
private boolean negated

Constructor Detail

AbstractNegatableSqmPredicateback to summary
public AbstractNegatableSqmPredicate(NodeBuilder nodeBuilder)
AbstractNegatableSqmPredicateback to summary
public AbstractNegatableSqmPredicate(boolean negated, NodeBuilder nodeBuilder)
AbstractNegatableSqmPredicateback to summary
public AbstractNegatableSqmPredicate(SqmExpressible<Boolean> type, boolean negated, NodeBuilder nodeBuilder)

Method Detail

createNegatedNodeback to summary
protected abstract SqmNegatablePredicate createNegatedNode()
isNegatedback to summary
public boolean isNegated()

Implements org.hibernate.query.sqm.tree.predicate.SqmNegatablePredicate.isNegated, jakarta.persistence.criteria.Predicate.isNegated.

Doc from org.hibernate.query.sqm.tree.predicate.SqmNegatablePredicate.isNegated.

Is this predicate (currently) negated?

Returns:boolean

true if we have a negated form currently

Annotations
@Override
negateback to summary
public void negate()

Implements org.hibernate.query.sqm.tree.predicate.SqmNegatablePredicate.negate.

Doc from org.hibernate.query.sqm.tree.predicate.SqmNegatablePredicate.negate.

Apply an external negation. Called when we encounter a NOT grouping.

For example, for not(x is null) we build the SqmNullnessPredicate and then call its negate method which results in x is not null.

Can be applied nested as well. For example, not(not(x is null)) becomes x is null because the double-negative cancel each other out.

Annotations
@Override
notback to summary
public SqmNegatablePredicate not()

Implements org.hibernate.query.sqm.tree.predicate.SqmPredicate.not.

Doc from jakarta.persistence.criteria.Predicate.not.

Create a negation of the predicate.

Returns:SqmNegatablePredicate

negated predicate

Annotations
@Override