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