public class SimpleCaseExpression<C,R> extends ExpressionImpl<R> implements CriteriaBuilder.SimpleCase<C,R>, Serializable
CASE [expression] WHEN [firstCondition] THEN [firstResult] WHEN [secondCondition] THEN [secondResult] ELSE [defaultResult] END
Modifier and Type | Class and Description |
---|---|
class |
SimpleCaseExpression.WhenClause |
ParameterContainer.Helper
Constructor and Description |
---|
SimpleCaseExpression(CriteriaBuilderImpl criteriaBuilder,
Class<R> javaType,
Expression<? extends C> expression) |
Modifier and Type | Method and Description |
---|---|
Expression<C> |
getExpression() |
Expression<? extends R> |
getOtherwiseResult() |
List<SimpleCaseExpression.WhenClause> |
getWhenClauses() |
Expression<R> |
otherwise(Expression<? extends R> result) |
Expression<R> |
otherwise(R result) |
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.SimpleCase<C,R> |
when(C condition,
Expression<? extends R> result) |
CriteriaBuilder.SimpleCase<C,R> |
when(C condition,
R result) |
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 SimpleCaseExpression(CriteriaBuilderImpl criteriaBuilder, Class<R> javaType, Expression<? extends C> expression)
public Expression<C> getExpression()
getExpression
in interface CriteriaBuilder.SimpleCase<C,R>
public CriteriaBuilder.SimpleCase<C,R> when(C condition, R result)
when
in interface CriteriaBuilder.SimpleCase<C,R>
public CriteriaBuilder.SimpleCase<C,R> when(C condition, Expression<? extends R> result)
when
in interface CriteriaBuilder.SimpleCase<C,R>
public Expression<R> otherwise(R result)
otherwise
in interface CriteriaBuilder.SimpleCase<C,R>
public Expression<R> otherwise(Expression<? extends R> result)
otherwise
in interface CriteriaBuilder.SimpleCase<C,R>
public Expression<? extends R> getOtherwiseResult()
public List<SimpleCaseExpression.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 © 2001-2015 Red Hat, Inc. All Rights Reserved.