public class SearchedCaseExpression<R> extends ExpressionImpl<R> implements CriteriaBuilder.Case<R>, Serializable
CASE
WHEN [firstCondition] THEN [firstResult]
WHEN [secondCondition] THEN [secondResult]
ELSE [defaultResult]
END
| Modifier and Type | Class and Description |
|---|---|
class |
SearchedCaseExpression.WhenClause |
ParameterContainer.Helper| Constructor and Description |
|---|
SearchedCaseExpression(CriteriaBuilderImpl criteriaBuilder,
Class<R> javaType) |
| Modifier and Type | Method and Description |
|---|---|
Expression<? extends R> |
getOtherwiseResult() |
List<SearchedCaseExpression.WhenClause> |
getWhenClauses() |
Expression<R> |
otherwise(Expression<? extends R> result)
Add an "else" clause to the case expression.
|
Expression<R> |
otherwise(R result)
Add an "else" clause to the case expression.
|
void |
registerParameters(ParameterRegistry registry)
Register any parameters contained within this query component with the given registry.
|
String |
render(RenderingContext renderingContext) |
String |
renderProjection(RenderingContext renderingContext) |
CriteriaBuilder.Case<R> |
when(Expression<Boolean> condition,
Expression<? extends R> result)
Add a when/then clause to the case expression.
|
CriteriaBuilder.Case<R> |
when(Expression<Boolean> condition,
R result)
Add a when/then clause to the case expression.
|
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, in, in, in, in, isNotNull, isNullalias, getCompoundSelectionItems, getValueHandlers, isCompoundSelectionforceConversion, getAlias, getJavaType, getValueHandler, resetJavaType, setAliascriteriaBuilderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitas, in, in, in, in, isNotNull, isNullalias, getCompoundSelectionItems, isCompoundSelectiongetAlias, getJavaTypegetValueHandlersgetValueHandlerpublic SearchedCaseExpression(CriteriaBuilderImpl criteriaBuilder, Class<R> javaType)
public CriteriaBuilder.Case<R> when(Expression<Boolean> condition, R result)
CriteriaBuilder.Casewhen in interface CriteriaBuilder.Case<R>condition - "when" conditionresult - "then" result valuepublic CriteriaBuilder.Case<R> when(Expression<Boolean> condition, Expression<? extends R> result)
CriteriaBuilder.Casewhen in interface CriteriaBuilder.Case<R>condition - "when" conditionresult - "then" result expressionpublic Expression<R> otherwise(R result)
CriteriaBuilder.Caseotherwise in interface CriteriaBuilder.Case<R>result - "else" resultpublic Expression<R> otherwise(Expression<? extends R> result)
CriteriaBuilder.Caseotherwise in interface CriteriaBuilder.Case<R>result - "else" result expressionpublic Expression<? extends R> getOtherwiseResult()
public List<SearchedCaseExpression.WhenClause> getWhenClauses()
public void registerParameters(ParameterRegistry registry)
ParameterContainerregisterParameters in interface ParameterContainerregistry - The parameter registry with which to register.public String render(RenderingContext renderingContext)
render in interface Renderablepublic String renderProjection(RenderingContext renderingContext)
renderProjection in interface RenderableCopyright © 2018 JBoss by Red Hat. All rights reserved.