Class CompoundExpressionImpl
- 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
-
- 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 Summary
Fields Modifier and Type Field Description protected booleanisNegated-
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 CompoundExpressionImpl(javax.persistence.metamodel.Metamodel metamodel, org.eclipse.persistence.expressions.Expression expressionNode, java.util.List<javax.persistence.criteria.Expression<?>> compoundExpressions)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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<javax.persistence.criteria.Expression<java.lang.Boolean>>getExpressions()javax.persistence.criteria.Predicate.BooleanOperatorgetOperator()Return the boolean operator for the predicate.booleanisCompoundExpression()booleanisExpression()booleanisNegated()Has negation been applied to the predicate.booleanisPredicate()javax.persistence.criteria.Predicatenot()Apply negation to the predicate.protected voidsetIsNegated(boolean isNegated)voidsetOperator(javax.persistence.criteria.Predicate.BooleanOperator operator)voidsetParentNode(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.-
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, isJunction, 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
-
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:
getOperatorin interfacejavax.persistence.criteria.Predicate- Returns:
- boolean operator for the predicate
-
getExpressions
public java.util.List<javax.persistence.criteria.Expression<java.lang.Boolean>> getExpressions()
- Specified by:
getExpressionsin interfacejavax.persistence.criteria.Predicate
-
isCompoundExpression
public boolean isCompoundExpression()
- Specified by:
isCompoundExpressionin interfaceInternalExpression- Overrides:
isCompoundExpressionin classFunctionExpressionImpl<java.lang.Boolean>
-
isExpression
public boolean isExpression()
- Specified by:
isExpressionin interfaceInternalExpression- Overrides:
isExpressionin classFunctionExpressionImpl<java.lang.Boolean>
-
isNegated
public boolean isNegated()
Has negation been applied to the predicate.- Specified by:
isNegatedin interfacejavax.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:
notin interfacejavax.persistence.criteria.Predicate- Returns:
- the negated predicate
-
isPredicate
public boolean isPredicate()
- Specified by:
isPredicatein interfaceInternalExpression- Overrides:
isPredicatein classExpressionImpl<java.lang.Boolean>
-
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.
-
-