Interface SqmNegatablePredicate

All Superinterfaces:
Expression<Boolean>, JpaCriteriaNode, JpaExpression<Boolean>, JpaPredicate, JpaSelection<Boolean>, JpaTupleElement<Boolean>, Predicate, Selection<Boolean>, Serializable, SqmExpressibleAccessor<Boolean>, SqmExpression<Boolean>, SqmNode, SqmPredicate, SqmSelectableNode<Boolean>, SqmTypedNode<Boolean>, SqmVisitableNode, TupleElement<Boolean>
All Known Subinterfaces:
SqmInPredicate<T>
All Known Implementing Classes:
AbstractNegatableSqmPredicate, SqmBetweenPredicate, SqmBooleanExpressionPredicate, SqmComparisonPredicate, SqmEmptinessPredicate, SqmExistsPredicate, SqmInListPredicate, SqmInSubQueryPredicate, SqmLikePredicate, SqmMemberOfPredicate, SqmNegatedPredicate, SqmNullnessPredicate, SqmTruthnessPredicate

public interface SqmNegatablePredicate extends SqmPredicate
Contract for predicates that have a negated form, e.g. x is not null as opposed to not(x is null)
  • Method Details

    • isNegated

      boolean isNegated()
      Is this predicate (currently) negated?
      Specified by:
      isNegated in interface Predicate
      Returns:
      true if we have a negated form currently
    • negate

      void 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.