Module org.eclipse.persistence.jpa
Class PredicateImpl
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
org.eclipse.persistence.internal.jpa.querydef.PredicateImpl
- All Implemented Interfaces:
Expression<Boolean>
,Predicate
,Selection<Boolean>
,TupleElement<Boolean>
,Serializable
,InternalExpression
,InternalSelection
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.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
ConstructorDescriptionPredicateImpl
(Metamodel metamodel, Expression expressionNode, List<Expression<?>> parentExpressions, Predicate.BooleanOperator operator) -
Method Summary
Modifier and TypeMethodDescriptionReturn the top-level conjuncts or disjuncts of the predicate.INTERNAL: This method returns null if this is not a conjunction/disjunction TRUE if this is a conjunction, FALSE for disjunction.Return the boolean operator for the predicate.boolean
boolean
not()
Apply negation to the predicate.void
setOperator
(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 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
-
booloperator
-
-
Constructor Details
-
PredicateImpl
public PredicateImpl(Metamodel metamodel, Expression expressionNode, List<Expression<?>> parentExpressions, Predicate.BooleanOperator operator)
-
-
Method Details
-
getJunctionValue
INTERNAL: This method returns null if this is not a conjunction/disjunction TRUE if this is a conjunction, FALSE for disjunction. -
getOperator
Description copied from class:CompoundExpressionImpl
Return the boolean operator for the predicate. If the predicate is simple, this is AND.- Specified by:
getOperator
in interfacePredicate
- Overrides:
getOperator
in classCompoundExpressionImpl
- Returns:
- boolean operator for the predicate
-
getExpressions
Return the top-level conjuncts or disjuncts of the predicate.- Specified by:
getExpressions
in interfacePredicate
- Overrides:
getExpressions
in classCompoundExpressionImpl
- Returns:
- list boolean expressions forming the predicate
-
not
Apply negation to the predicate.- Specified by:
not
in interfacePredicate
- Overrides:
not
in classCompoundExpressionImpl
- Returns:
- the negated predicate
-
setOperator
- Overrides:
setOperator
in classCompoundExpressionImpl
- Parameters:
operator
- the operator to set
-
isJunction
public boolean isJunction()- Specified by:
isJunction
in interfaceInternalExpression
- Overrides:
isJunction
in classExpressionImpl<Boolean>
-
isCompoundExpression
public boolean isCompoundExpression()- Specified by:
isCompoundExpression
in interfaceInternalExpression
- Overrides:
isCompoundExpression
in classCompoundExpressionImpl
-