Class PredicateImpl

  • All Implemented Interfaces:
    jakarta.persistence.criteria.Expression<Boolean>, jakarta.persistence.criteria.Predicate, jakarta.persistence.criteria.Selection<Boolean>, jakarta.persistence.TupleElement<Boolean>, Serializable, InternalExpression, InternalSelection

    public class PredicateImpl
    extends CompoundExpressionImpl
    implements jakarta.persistence.criteria.Predicate

    Purpose: Contains the implementation of the Predicate interface of the JPA criteria API.

    Description: The predicate forms the least specific expression node. Predicates result in boolean expressions that are combined to form the final expression.

    Since:
    EclipseLink 1.2
    Author:
    gyorke
    See Also:
    Predicate, Serialized Form
    • Field Detail

      • booloperator

        protected jakarta.persistence.criteria.Predicate.BooleanOperator booloperator
    • Constructor Detail

      • PredicateImpl

        public PredicateImpl​(jakarta.persistence.metamodel.Metamodel metamodel,
                             Expression expressionNode,
                             List<jakarta.persistence.criteria.Expression<?>> parentExpressions,
                             jakarta.persistence.criteria.Predicate.BooleanOperator operator)
    • Method Detail

      • getJunctionValue

        public Boolean getJunctionValue()
        INTERNAL: This method returns null if this is not a conjunction/disjunction TRUE if this is a conjunction, FALSE for disjunction.
      • getOperator

        public jakarta.persistence.criteria.Predicate.BooleanOperator getOperator()
        Description copied from class: CompoundExpressionImpl
        Return the boolean operator for the predicate. If the predicate is simple, this is AND.
        Specified by:
        getOperator in interface jakarta.persistence.criteria.Predicate
        Overrides:
        getOperator in class CompoundExpressionImpl
        Returns:
        boolean operator for the predicate
      • getExpressions

        public List<jakarta.persistence.criteria.Expression<Boolean>> getExpressions()
        Return the top-level conjuncts or disjuncts of the predicate.
        Specified by:
        getExpressions in interface jakarta.persistence.criteria.Predicate
        Overrides:
        getExpressions in class CompoundExpressionImpl
        Returns:
        list boolean expressions forming the predicate
      • not

        public jakarta.persistence.criteria.Predicate not()
        Apply negation to the predicate.
        Specified by:
        not in interface jakarta.persistence.criteria.Predicate
        Overrides:
        not in class CompoundExpressionImpl
        Returns:
        the negated predicate
      • setOperator

        public void setOperator​(jakarta.persistence.criteria.Predicate.BooleanOperator operator)
        Overrides:
        setOperator in class CompoundExpressionImpl
        Parameters:
        operator - the operator to set