Class PredicateImpl
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.querydef.SelectionImpl<X>
-
- org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl<X>
-
- org.eclipse.persistence.internal.jpa.querydef.FunctionExpressionImpl<java.lang.Boolean>
-
- org.eclipse.persistence.internal.jpa.querydef.CompoundExpressionImpl
-
- org.eclipse.persistence.internal.jpa.querydef.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 Summary
Fields Modifier and Type Field Description protected javax.persistence.criteria.Predicate.BooleanOperatorbooloperator-
Fields inherited from class org.eclipse.persistence.internal.jpa.querydef.CompoundExpressionImpl
isNegated
-
Fields inherited from class org.eclipse.persistence.internal.jpa.querydef.FunctionExpressionImpl
expressions, operator
-
Fields inherited from class org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl
isLiteral, literal, metamodel
-
Fields inherited from class org.eclipse.persistence.internal.jpa.querydef.SelectionImpl
alias, currentNode, javaType
-
-
Constructor Summary
Constructors Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<javax.persistence.criteria.Expression<java.lang.Boolean>>getExpressions()Return the top-level conjuncts or disjuncts of the predicate.java.lang.BooleangetJunctionValue()INTERNAL: This method returns null if this is not a conjunction/disjunction TRUE if this is a conjunction, FALSE for disjunction.javax.persistence.criteria.Predicate.BooleanOperatorgetOperator()Return the boolean operator for the predicate.booleanisCompoundExpression()booleanisJunction()javax.persistence.criteria.Predicatenot()Apply negation to the predicate.voidsetOperator(javax.persistence.criteria.Predicate.BooleanOperator operator)-
Methods inherited from class org.eclipse.persistence.internal.jpa.querydef.CompoundExpressionImpl
isExpression, isNegated, isPredicate, setIsNegated, setParentNode
-
Methods inherited from class org.eclipse.persistence.internal.jpa.querydef.FunctionExpressionImpl
findRootAndParameters, getChildExpressions, getOperation
-
Methods inherited from class org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl
as, buildExpressionForAs, in, in, in, in, isLiteral, isNotNull, isNull, isParameter, isSubquery
-
Methods inherited from class org.eclipse.persistence.internal.jpa.querydef.SelectionImpl
alias, getAlias, getCompoundSelectionItems, getCurrentNode, getJavaType, isCompoundSelection, isConstructor, isFrom, isRoot, setJavaType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.persistence.criteria.Expression
as, in, in, in, in, isNotNull, isNull
-
-
-
-
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:CompoundExpressionImplReturn the boolean operator for the predicate. If the predicate is simple, this is AND.- Specified by:
getOperatorin interfacejavax.persistence.criteria.Predicate- Overrides:
getOperatorin classCompoundExpressionImpl- 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:
getExpressionsin interfacejavax.persistence.criteria.Predicate- Overrides:
getExpressionsin classCompoundExpressionImpl- Returns:
- list boolean expressions forming the predicate
-
not
public javax.persistence.criteria.Predicate not()
Apply negation to the predicate.- Specified by:
notin interfacejavax.persistence.criteria.Predicate- Overrides:
notin classCompoundExpressionImpl- Returns:
- the negated predicate
-
setOperator
public void setOperator(javax.persistence.criteria.Predicate.BooleanOperator operator)
- Overrides:
setOperatorin classCompoundExpressionImpl- Parameters:
operator- the operator to set
-
isJunction
public boolean isJunction()
- Specified by:
isJunctionin interfaceInternalExpression- Overrides:
isJunctionin classExpressionImpl<java.lang.Boolean>
-
isCompoundExpression
public boolean isCompoundExpression()
- Specified by:
isCompoundExpressionin interfaceInternalExpression- Overrides:
isCompoundExpressionin classCompoundExpressionImpl
-
-