Class CompoundExpressionImpl

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

    public class CompoundExpressionImpl
    extends FunctionExpressionImpl<Boolean>
    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

      • isNegated

        protected boolean isNegated
    • Constructor Detail

      • CompoundExpressionImpl

        public CompoundExpressionImpl​(jakarta.persistence.metamodel.Metamodel metamodel,
                                      Expression expressionNode,
                                      List<jakarta.persistence.criteria.Expression<?>> compoundExpressions)
      • CompoundExpressionImpl

        public CompoundExpressionImpl​(jakarta.persistence.metamodel.Metamodel metamodel,
                                      Expression expressionNode,
                                      List<jakarta.persistence.criteria.Expression<?>> compoundExpressions,
                                      String operator)
    • Method Detail

      • getOperator

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

        public List<jakarta.persistence.criteria.Expression<Boolean>> getExpressions()
        Specified by:
        getExpressions in interface jakarta.persistence.criteria.Predicate
      • isNegated

        public boolean isNegated()
        Has negation been applied to the predicate.
        Specified by:
        isNegated in interface jakarta.persistence.criteria.Predicate
        Returns:
        boolean indicating if the predicate has been negated
      • not

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

        protected void setIsNegated​(boolean isNegated)
      • setOperator

        public void setOperator​(jakarta.persistence.criteria.Predicate.BooleanOperator operator)
        Parameters:
        operator - the operator to set
      • setParentNode

        public void setParentNode​(Expression parentNode)
        This method is used to store what will be the parent EclipseLink expression in the case the tree needs to be altered. Currently used for In.