Class CompoundExpressionImpl

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

    public class CompoundExpressionImpl
    extends FunctionExpressionImpl<java.lang.Boolean>
    implements javax.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​(javax.persistence.metamodel.Metamodel metamodel,
                                      org.eclipse.persistence.expressions.Expression expressionNode,
                                      java.util.List<javax.persistence.criteria.Expression<?>> compoundExpressions)
      • CompoundExpressionImpl

        public CompoundExpressionImpl​(javax.persistence.metamodel.Metamodel metamodel,
                                      org.eclipse.persistence.expressions.Expression expressionNode,
                                      java.util.List<javax.persistence.criteria.Expression<?>> compoundExpressions,
                                      java.lang.String operator)
    • Method Detail

      • getOperator

        public javax.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 javax.persistence.criteria.Predicate
        Returns:
        boolean operator for the predicate
      • getExpressions

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

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

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

        protected void setIsNegated​(boolean isNegated)
      • setOperator

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

        public void setParentNode​(org.eclipse.persistence.expressions.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.