cayenne
cayenne copied to clipboard
CAY-2597 `case-when` implementation
PR brings support for the CASE-WHEN SQL operator to the Cayenne expression API.
Usage example (from the test):
Expression caseWhen = ExpressionFactory.caseWhen(
List.of(Artist.PAINTING_ARRAY.dot(Painting.ESTIMATED_PRICE).between(BigDecimal.ZERO, BigDecimal.valueOf(50)),
Artist.PAINTING_ARRAY.dot(Painting.ESTIMATED_PRICE).between(BigDecimal.valueOf(51), BigDecimal.valueOf(100))),
List.of(Artist.ARTIST_NAME.getExpression(),
Artist.DATE_OF_BIRTH.getExpression()));
This PR supersedes #593