Module org.eclipse.persistence.jpa
Class CriteriaBuilderImpl.CaseImpl<R>
java.lang.Object
org.eclipse.persistence.internal.jpa.querydef.SelectionImpl<R>
org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl<R>
org.eclipse.persistence.internal.jpa.querydef.FunctionExpressionImpl<R>
org.eclipse.persistence.internal.jpa.querydef.CriteriaBuilderImpl.CaseImpl<R>
- Type Parameters:
R
-
- All Implemented Interfaces:
CriteriaBuilder.Case<R>
,Expression<R>
,Selection<R>
,TupleElement<R>
,Serializable
,InternalExpression
,InternalSelection
- Enclosing class:
CriteriaBuilderImpl
public class CriteriaBuilderImpl.CaseImpl<R>
extends FunctionExpressionImpl<R>
implements CriteriaBuilder.Case<R>
Implementation of Case interface from Criteria Builder
- See Also:
-
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
ModifierConstructorDescriptionprotected
CaseImpl
(Metamodel metamodel, Class<R> resultClass, Expression expressionNode, List<Expression<?>> compoundExpressions) protected
CaseImpl
(Metamodel metamodel, Class<R> resultClass, Expression expressionNode, List<Expression<?>> compoundExpressions, String operator) -
Method Summary
Modifier and TypeMethodDescriptionvoid
otherwise
(Expression<? extends R> result) Add an "else" clause to the case expression.Add an "else" clause to the case expression.when
(Expression<Boolean> condition, Expression<? extends R> result) Add a when/then clause to the case expression.when
(Expression<Boolean> condition, R result) Add a when/then clause to the case expression.Methods inherited from class org.eclipse.persistence.internal.jpa.querydef.FunctionExpressionImpl
getChildExpressions, getOperation, isCompoundExpression, isExpression
Methods inherited from class org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl
as, buildExpressionForAs, in, in, in, in, isJunction, isLiteral, isNotNull, isNull, isParameter, isPredicate, 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
-
Constructor Details
-
CaseImpl
protected CaseImpl(Metamodel metamodel, Class<R> resultClass, Expression expressionNode, List<Expression<?>> compoundExpressions) -
CaseImpl
protected CaseImpl(Metamodel metamodel, Class<R> resultClass, Expression expressionNode, List<Expression<?>> compoundExpressions, String operator)
-
-
Method Details
-
when
Add a when/then clause to the case expression.- Specified by:
when
in interfaceCriteriaBuilder.Case<R>
- Parameters:
condition
- "when" conditionresult
- "then" result value- Returns:
- general case expression
-
when
Add a when/then clause to the case expression.- Specified by:
when
in interfaceCriteriaBuilder.Case<R>
- Parameters:
condition
- "when" conditionresult
- "then" result expression- Returns:
- general case expression
-
otherwise
Add an "else" clause to the case expression.- Specified by:
otherwise
in interfaceCriteriaBuilder.Case<R>
- Parameters:
result
- "else" result- Returns:
- expression
-
otherwise
Add an "else" clause to the case expression.- Specified by:
otherwise
in interfaceCriteriaBuilder.Case<R>
- Parameters:
result
- "else" result expression- Returns:
- expression
-
findRootAndParameters
- Specified by:
findRootAndParameters
in interfaceInternalSelection
- Overrides:
findRootAndParameters
in classFunctionExpressionImpl<R>
-