Module jakarta.persistence
Package jakarta.persistence.criteria
Interface CriteriaBuilder.SimpleCase<C,R>
- All Superinterfaces:
Expression<R>
,Selection<R>
,TupleElement<R>
- Enclosing interface:
CriteriaBuilder
Interface used to build simple case expressions.
Case conditions are evaluated in the order in which
they are specified.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the expression to be tested against the conditions.otherwise
(Expression<? extends R> result) Add an "else" clause to the case expression.Add an "else" clause to the case expression.when
(C condition, Expression<? extends R> result) Add a when/then clause to the case expression.Add a when/then clause to the case expression.when
(Expression<? extends C> condition, Expression<? extends R> result) Add a when/then clause to the case expression.when
(Expression<? extends C> 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
-
getExpression
Expression<C> getExpression()Return the expression to be tested against the conditions.- Returns:
- expression
-
when
Add a when/then clause to the case expression.- Parameters:
condition
- "when" conditionresult
- "then" result value- Returns:
- simple case expression
-
when
Add a when/then clause to the case expression.- Parameters:
condition
- "when" conditionresult
- "then" result expression- Returns:
- simple case expression
-
when
Add a when/then clause to the case expression.- Parameters:
condition
- "when" conditionresult
- "then" result value- Returns:
- simple case expression
-
when
CriteriaBuilder.SimpleCase<C,R> when(Expression<? extends C> condition, Expression<? extends R> result) Add a when/then clause to the case expression.- Parameters:
condition
- "when" conditionresult
- "then" result expression- Returns:
- simple 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
-