Package javax.persistence.criteria
Interface CriteriaBuilder.Case<R>
- 
- All Superinterfaces:
- Expression<R>,- Selection<R>,- TupleElement<R>
 - Enclosing interface:
- CriteriaBuilder
 
 public static interface CriteriaBuilder.Case<R> extends Expression<R> Interface used to build general case expressions. Case conditions are evaluated in the order in which they are specified.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.CriteriaBuilder.Case<R>when(Expression<java.lang.Boolean> condition, Expression<? extends R> result)Add a when/then clause to the case expression.CriteriaBuilder.Case<R>when(Expression<java.lang.Boolean> condition, R result)Add a when/then clause to the case expression.- 
Methods inherited from interface javax.persistence.criteria.Expressionas, in, in, in, in, isNotNull, isNull
 - 
Methods inherited from interface javax.persistence.criteria.Selectionalias, getCompoundSelectionItems, isCompoundSelection
 - 
Methods inherited from interface javax.persistence.TupleElementgetAlias, getJavaType
 
- 
 
- 
- 
- 
Method Detail- 
whenCriteriaBuilder.Case<R> when(Expression<java.lang.Boolean> condition, R result) Add a when/then clause to the case expression.- Parameters:
- condition- "when" condition
- result- "then" result value
- Returns:
- general case expression
 
 - 
whenCriteriaBuilder.Case<R> when(Expression<java.lang.Boolean> condition, Expression<? extends R> result) Add a when/then clause to the case expression.- Parameters:
- condition- "when" condition
- result- "then" result expression
- Returns:
- general case expression
 
 - 
otherwiseExpression<R> otherwise(R result) Add an "else" clause to the case expression.- Parameters:
- result- "else" result
- Returns:
- expression
 
 - 
otherwiseExpression<R> otherwise(Expression<? extends R> result) Add an "else" clause to the case expression.- Parameters:
- result- "else" result expression
- Returns:
- expression
 
 
- 
 
-