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, operatorFields inherited from class org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl
isLiteral, literal, metamodelFields inherited from class org.eclipse.persistence.internal.jpa.querydef.SelectionImpl
alias, currentNode, javaType -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCaseImpl(Metamodel metamodel, Class<R> resultClass, Expression expressionNode, List<Expression<?>> compoundExpressions) protectedCaseImpl(Metamodel metamodel, Class<R> resultClass, Expression expressionNode, List<Expression<?>> compoundExpressions, String operator) -
Method Summary
Modifier and TypeMethodDescriptionvoidotherwise(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, isExpressionMethods inherited from class org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl
as, buildExpressionForAs, in, in, in, in, isJunction, isLiteral, isNotNull, isNull, isParameter, isPredicate, isSubqueryMethods inherited from class org.eclipse.persistence.internal.jpa.querydef.SelectionImpl
alias, getAlias, getCompoundSelectionItems, getCurrentNode, getJavaType, isCompoundSelection, isConstructor, isFrom, isRoot, setJavaTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.persistence.criteria.Expression
as, in, in, in, in, isNotNull, isNullMethods inherited from interface jakarta.persistence.criteria.Selection
alias, getCompoundSelectionItems, isCompoundSelectionMethods 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:
whenin 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:
whenin 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:
otherwisein interfaceCriteriaBuilder.Case<R>- Parameters:
result- "else" result- Returns:
- expression
-
otherwise
Add an "else" clause to the case expression.- Specified by:
otherwisein interfaceCriteriaBuilder.Case<R>- Parameters:
result- "else" result expression- Returns:
- expression
-
findRootAndParameters
- Specified by:
findRootAndParametersin interfaceInternalSelection- Overrides:
findRootAndParametersin classFunctionExpressionImpl<R>
-