Package com.sap.cds.ql
Interface Then
- All Known Subinterfaces:
CqnBuilder.QueryBuilderSupport
public interface Then
-
Method Summary
Modifier and TypeMethodDescription<T extends Value<?> & CqnCaseExpression>
TConverts a chain of when-then expressions (a list ofcases
) to acase expression
, which returns a given default value if no condition of any case matches.<T extends Value<?> & CqnCaseExpression>
TConverts a chain of when-then expressions (a list ofcases
) to acase expression
, which returns a given default value if no condition of any case matches.when
(CqnPredicate pred) Connects a nextcase
) to a chain of when-then expressions.
-
Method Details
-
when
Connects a nextcase
) to a chain of when-then expressions.- Parameters:
pred
- thecondition
of the next case.- Returns:
- a builder to specify the case's return value
-
orElse
Converts a chain of when-then expressions (a list ofcases
) to acase expression
, which returns a given default value if no condition of any case matches.- Parameters:
defaultValue
- the default value- Returns:
- the case expression
- See Also:
-
orElse
Converts a chain of when-then expressions (a list ofcases
) to acase expression
, which returns a given default value if no condition of any case matches.- Parameters:
defaultValue
- the default value- Returns:
- the case expression
- See Also:
-