JPA Interface

SimpleCase

Super Interfaces:
Expression<R>, Selection<R>, TupleElement<R>

Interface used to build simple case expressions. Case conditions are evaluated in the order in which they are specified.
Since:
JPA 2.0

Public Methods

Return the expression to be tested against the conditions.
Return:
expression
Since:
JPA 2.0
Expression<R> otherwise(Expression<?extendsR> result)
Add an "else" clause to the case expression.
Parameters:
result - "else" result expression
Return:
expression
Since:
JPA 2.0
Expression<R> otherwise(R result)
Add an "else" clause to the case expression.
Parameters:
result - "else" result
Return:
expression
Since:
JPA 2.0
CriteriaBuilder.SimpleCase<C,R> when(C condition, Expression<?extendsR> result)
Add a when/then clause to the case expression.
Parameters:
condition - "when" condition
result - "then" result expression
Return:
simple case expression
Since:
JPA 2.0
CriteriaBuilder.SimpleCase<C,R> when(C condition, R result)
Add a when/then clause to the case expression.
Parameters:
condition - "when" condition
result - "then" result value
Return:
simple case expression
Since:
JPA 2.0