Class PredicateImpl

  • 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

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

      • booloperator

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

      • PredicateImpl

        public PredicateImpl​(javax.persistence.metamodel.Metamodel metamodel,
                             org.eclipse.persistence.expressions.Expression expressionNode,
                             java.util.List<javax.persistence.criteria.Expression<?>> parentExpressions,
                             javax.persistence.criteria.Predicate.BooleanOperator operator)
    • Method Detail

      • getJunctionValue

        public java.lang.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 javax.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 javax.persistence.criteria.Predicate
        Overrides:
        getOperator in class CompoundExpressionImpl
        Returns:
        boolean operator for the predicate
      • getExpressions

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

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

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