Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.querydef

public Class CompoundExpressionImpl

extends FunctionExpressionImpl<Boolean>
implements Predicate
Class Inheritance
All Implemented Interfaces
jakarta.persistence.criteria.Predicate, jakarta.persistence.criteria.Expression, jakarta.persistence.criteria.Selection, jakarta.persistence.TupleElement
Known Direct Subclasses
org.eclipse.persistence.internal.jpa.querydef.InImpl, org.eclipse.persistence.internal.jpa.querydef.PredicateImpl
Imports
java.util.ArrayList, .List, jakarta.persistence.criteria.Expression, .Predicate, jakarta.persistence.metamodel.Metamodel, org.eclipse.persistence.internal.helper.ClassConstants

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.

Author
gyorke
Since
EclipseLink 1.2
See Also
Predicate

Field Summary

Modifier and TypeField and Description
protected boolean
Inherited from org.eclipse.persistence.internal.jpa.querydef.FunctionExpressionImpl:
expressionsoperator

Constructor Summary

AccessConstructor and Description
public <T>
CompoundExpressionImpl(Metamodel metamodel, Expression expressionNode, List<Expression<?>> compoundExpressions)

public <T>
CompoundExpressionImpl(Metamodel metamodel, Expression expressionNode, List<Expression<?>> compoundExpressions, String operator)

Method Summary

Modifier and TypeMethod and Description
public List<Expression<Boolean>>
getExpressions()

Implements jakarta.persistence.criteria.Predicate.getExpressions.

Return the top-level conjuncts or disjuncts of the predicate.
public Predicate.BooleanOperator

Returns:

boolean operator for the predicate
getOperator
()

Implements jakarta.persistence.criteria.Predicate.getOperator.

Return the boolean operator for the predicate.
public boolean
public boolean
public boolean

Returns:

boolean indicating if the predicate has been negated
isNegated
()

Implements jakarta.persistence.criteria.Predicate.isNegated.

Has negation been applied to the predicate.
public boolean
public Predicate

Returns:

the negated predicate
not
()

Implements jakarta.persistence.criteria.Predicate.not.

Apply negation to the predicate.
protected void
setIsNegated(boolean isNegated)

public void
setOperator(Predicate.BooleanOperator
the operator to set
operator
)

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.

Inherited from org.eclipse.persistence.internal.jpa.querydef.FunctionExpressionImpl:
findRootAndParametersgetChildExpressionsgetOperation

Field Detail

isNegatedback to summary
protected boolean isNegated

Constructor Detail

CompoundExpressionImplback to summary
public <T> CompoundExpressionImpl(Metamodel metamodel, Expression expressionNode, List<Expression<?>> compoundExpressions)
CompoundExpressionImplback to summary
public <T> CompoundExpressionImpl(Metamodel metamodel, Expression expressionNode, List<Expression<?>> compoundExpressions, String operator)

Method Detail

getExpressionsback to summary
public List<Expression<Boolean>> getExpressions()

Implements jakarta.persistence.criteria.Predicate.getExpressions.

Doc from jakarta.persistence.criteria.Predicate.getExpressions.

Return the top-level conjuncts or disjuncts of the predicate. Returns empty list if there are no top-level conjuncts or disjuncts of the predicate. Modifications to the list do not affect the query.

Returns:List<Expression<Boolean>>

list of boolean expressions forming the predicate

Annotations
@Override
getOperatorback to summary
public Predicate.BooleanOperator getOperator()

Implements jakarta.persistence.criteria.Predicate.getOperator.

Return the boolean operator for the predicate. If the predicate is simple, this is AND.

Returns:Predicate.BooleanOperator

boolean operator for the predicate

Annotations
@Override
isCompoundExpressionback to summary
public boolean isCompoundExpression()

Overrides org.eclipse.persistence.internal.jpa.querydef.FunctionExpressionImpl.isCompoundExpression.

Implements org.eclipse.persistence.internal.jpa.querydef.InternalExpression.isCompoundExpression.

Annotations
@Override
isExpressionback to summary
public boolean isExpression()

Overrides org.eclipse.persistence.internal.jpa.querydef.FunctionExpressionImpl.isExpression.

Implements org.eclipse.persistence.internal.jpa.querydef.InternalExpression.isExpression.

Annotations
@Override
isNegatedback to summary
public boolean isNegated()

Implements jakarta.persistence.criteria.Predicate.isNegated.

Has negation been applied to the predicate.

Returns:boolean

boolean indicating if the predicate has been negated

Annotations
@Override
isPredicateback to summary
public boolean isPredicate()

Overrides org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl.isPredicate.

Implements org.eclipse.persistence.internal.jpa.querydef.InternalExpression.isPredicate.

Annotations
@Override
notback to summary
public Predicate not()

Implements jakarta.persistence.criteria.Predicate.not.

Apply negation to the predicate.

Returns:Predicate

the negated predicate

Annotations
@Override
setIsNegatedback to summary
protected void setIsNegated(boolean isNegated)
setOperatorback to summary
public void setOperator(Predicate.BooleanOperator operator)
Parameters
operator:Predicate.BooleanOperator

the operator to set

setParentNodeback to summary
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.