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, isNull
alias, getCompoundSelectionItems, getValueHandlers, isCompoundSelection
forceConversion, getAlias, getJavaType, getValueHandler, resetJavaType, setAlias
criteriaBuilder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
as, in, in, in, in, isNotNull, isNull
alias, getCompoundSelectionItems, isCompoundSelection
getAlias, getJavaType
getValueHandlers
getValueHandler
public SearchedCaseExpression(CriteriaBuilderImpl criteriaBuilder, Class<R> javaType)
public CriteriaBuilder.Case<R> when(Expression<Boolean> condition, R result)
CriteriaBuilder.Case
when
in interface CriteriaBuilder.Case<R>
condition
- "when" conditionresult
- "then" result valuepublic CriteriaBuilder.Case<R> when(Expression<Boolean> condition, Expression<? extends R> result)
CriteriaBuilder.Case
when
in interface CriteriaBuilder.Case<R>
condition
- "when" conditionresult
- "then" result expressionpublic Expression<R> otherwise(R result)
CriteriaBuilder.Case
otherwise
in interface CriteriaBuilder.Case<R>
result
- "else" resultpublic Expression<R> otherwise(Expression<? extends R> result)
CriteriaBuilder.Case
otherwise
in interface CriteriaBuilder.Case<R>
result
- "else" result expressionpublic Expression<? extends R> getOtherwiseResult()
public List<SearchedCaseExpression.WhenClause> getWhenClauses()
public void registerParameters(ParameterRegistry registry)
ParameterContainer
registerParameters
in interface ParameterContainer
registry
- The parameter registry with which to register.public String render(RenderingContext renderingContext)
render
in interface Renderable
public String renderProjection(RenderingContext renderingContext)
renderProjection
in interface Renderable
Copyright © 2016 JBoss by Red Hat. All rights reserved.