Module org.eclipse.persistence.jpa
Class CriteriaBuilderImpl.SimpleCaseImpl<C,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.SimpleCaseImpl<C,R>
- Type Parameters:
C
-R
-
- All Implemented Interfaces:
CriteriaBuilder.SimpleCase<C,
,R> Expression<R>
,Selection<R>
,TupleElement<R>
,Serializable
,InternalExpression
,InternalSelection
- Enclosing class:
CriteriaBuilderImpl
public class CriteriaBuilderImpl.SimpleCaseImpl<C,R>
extends FunctionExpressionImpl<R>
implements CriteriaBuilder.SimpleCase<C,R>
Implementation of SimpleCase interface from CriteriaBuilder
- 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
SimpleCaseImpl
(Metamodel metamodel, Class<R> resultClass, FunctionExpression expressionNode, List<Expression<?>> compoundExpressions, Expression<C> expression) protected
SimpleCaseImpl
(Metamodel metamodel, Class<R> resultClass, FunctionExpression expressionNode, List<Expression<?>> compoundExpressions, String operator, Expression<C> expression) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns the expression to be tested against the conditions.otherwise
(Expression<? extends R> result) Add an "else" clause to the case expression.Add an "else" clause to the case expression.when
(C condition, Expression<? extends R> result) Add a when/then clause to the case expression.Add a when/then clause to the case expression.when
(Expression<? extends C> condition, Expression<? extends R> result) Add a when/then clause to the case expression.when
(Expression<? extends C> 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
-
SimpleCaseImpl
protected SimpleCaseImpl(Metamodel metamodel, Class<R> resultClass, FunctionExpression expressionNode, List<Expression<?>> compoundExpressions, Expression<C> expression) -
SimpleCaseImpl
protected SimpleCaseImpl(Metamodel metamodel, Class<R> resultClass, FunctionExpression expressionNode, List<Expression<?>> compoundExpressions, String operator, Expression<C> expression)
-
-
Method Details
-
getExpression
Returns the expression to be tested against the conditions.- Specified by:
getExpression
in interfaceCriteriaBuilder.SimpleCase<C,
R> - Returns:
- expression
-
when
Add a when/then clause to the case expression.- Specified by:
when
in interfaceCriteriaBuilder.SimpleCase<C,
R> - Parameters:
condition
- "when" conditionresult
- "then" result value- Returns:
- simple case expression
-
when
Add a when/then clause to the case expression.- Specified by:
when
in interfaceCriteriaBuilder.SimpleCase<C,
R> - Parameters:
condition
- "when" conditionresult
- "then" result expression- Returns:
- simple case expression
-
when
Add a when/then clause to the case expression.- Specified by:
when
in interfaceCriteriaBuilder.SimpleCase<C,
R> - Parameters:
condition
- "when" conditionresult
- "then" result value- Returns:
- simple case expression
-
when
public CriteriaBuilder.SimpleCase<C,R> when(Expression<? extends C> condition, Expression<? extends R> result) Add a when/then clause to the case expression.- Specified by:
when
in interfaceCriteriaBuilder.SimpleCase<C,
R> - Parameters:
condition
- "when" conditionresult
- "then" result expression- Returns:
- simple case expression
-
otherwise
Add an "else" clause to the case expression.- Specified by:
otherwise
in interfaceCriteriaBuilder.SimpleCase<C,
R> - Parameters:
result
- "else" result- Returns:
- expression
-
otherwise
Add an "else" clause to the case expression.- Specified by:
otherwise
in interfaceCriteriaBuilder.SimpleCase<C,
R> - Parameters:
result
- "else" result expression- Returns:
- expression
-
findRootAndParameters
- Specified by:
findRootAndParameters
in interfaceInternalSelection
- Overrides:
findRootAndParameters
in classFunctionExpressionImpl<R>
-