Module org.eclipse.persistence.jpa
Class CompoundExpressionImpl
java.lang.Object
org.eclipse.persistence.internal.jpa.querydef.SelectionImpl<Boolean>
org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl<Boolean>
org.eclipse.persistence.internal.jpa.querydef.FunctionExpressionImpl<Boolean>
org.eclipse.persistence.internal.jpa.querydef.CompoundExpressionImpl
- All Implemented Interfaces:
Expression<Boolean>
,Predicate
,Selection<Boolean>
,TupleElement<Boolean>
,Serializable
,InternalExpression
,InternalSelection
- Direct Known Subclasses:
InImpl
,PredicateImpl
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
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.persistence.criteria.Predicate
Predicate.BooleanOperator
-
Field Summary
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
ConstructorDescriptionCompoundExpressionImpl
(Metamodel metamodel, Expression expressionNode, List<Expression<?>> compoundExpressions) CompoundExpressionImpl
(Metamodel metamodel, Expression expressionNode, List<Expression<?>> compoundExpressions, String operator) -
Method Summary
Modifier and TypeMethodDescriptionReturn the boolean operator for the predicate.boolean
boolean
boolean
Has negation been applied to the predicate.boolean
not()
Apply negation to the predicate.protected void
setIsNegated
(boolean isNegated) void
setOperator
(Predicate.BooleanOperator operator) 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.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
Methods inherited from interface jakarta.persistence.criteria.Selection
alias, getCompoundSelectionItems, isCompoundSelection
Methods inherited from interface jakarta.persistence.TupleElement
getAlias, getJavaType
-
Field Details
-
isNegated
protected boolean isNegated
-
-
Constructor Details
-
CompoundExpressionImpl
public CompoundExpressionImpl(Metamodel metamodel, Expression expressionNode, List<Expression<?>> compoundExpressions) -
CompoundExpressionImpl
public CompoundExpressionImpl(Metamodel metamodel, Expression expressionNode, List<Expression<?>> compoundExpressions, String operator)
-
-
Method Details
-
getOperator
Return the boolean operator for the predicate. If the predicate is simple, this is AND.- Specified by:
getOperator
in interfacePredicate
- Returns:
- boolean operator for the predicate
-
getExpressions
- Specified by:
getExpressions
in interfacePredicate
-
isCompoundExpression
public boolean isCompoundExpression()- Specified by:
isCompoundExpression
in interfaceInternalExpression
- Overrides:
isCompoundExpression
in classFunctionExpressionImpl<Boolean>
-
isExpression
public boolean isExpression()- Specified by:
isExpression
in interfaceInternalExpression
- Overrides:
isExpression
in classFunctionExpressionImpl<Boolean>
-
isNegated
public boolean isNegated()Has negation been applied to the predicate. -
not
Apply negation to the predicate. -
isPredicate
public boolean isPredicate()- Specified by:
isPredicate
in interfaceInternalExpression
- Overrides:
isPredicate
in classExpressionImpl<Boolean>
-
setIsNegated
protected void setIsNegated(boolean isNegated) -
setOperator
- Parameters:
operator
- the operator to set
-
setParentNode
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.
-