- All Superinterfaces:
Expression<R>
,Selection<R>
,TupleElement<R>
- Enclosing interface:
CriteriaBuilder
Interface used to build general case expressions.
Case conditions are evaluated in the order in which
they are specified.
-
Method Summary
Modifier and TypeMethodDescriptionotherwise
(Expression<? extends R> result) Add an "else" clause to the case expression.Add an "else" clause to the case expression.when
(Expression<Boolean> condition, Expression<? extends R> result) Add a when/then clause to the case expression.when
(Expression<Boolean> condition, R result) Add a when/then clause to the case expression.Methods inherited from interface jakarta.persistence.criteria.Expression
as, cast, equalTo, equalTo, in, in, in, in, isNotNull, isNull, notEqualTo, notEqualTo
Methods inherited from interface jakarta.persistence.criteria.Selection
alias, getCompoundSelectionItems, isCompoundSelection
Methods inherited from interface jakarta.persistence.TupleElement
getAlias, getJavaType
-
Method Details
-
when
Add a when/then clause to the case expression.- Parameters:
condition
- "when" conditionresult
- "then" result value- Returns:
- general case expression
-
when
Add a when/then clause to the case expression.- Parameters:
condition
- "when" conditionresult
- "then" result expression- Returns:
- general case expression
-
otherwise
Add an "else" clause to the case expression.- Parameters:
result
- "else" result- Returns:
- expression
-
otherwise
Add an "else" clause to the case expression.- Parameters:
result
- "else" result expression- Returns:
- expression
-