+ " WHERE c.country IN ('USA', 'UK', 'France')";
compare(jpql, q);
}
public void testConcat() {
DomainObject e = qb.createQueryDefinition(Employee.class);
DomainObject f = e.join("frequentFlierPlan");
Expression c =
e.generalCase().when(f.get("annualMiles").greaterThan(50000)).then(
"Platinum").when(f.get("annualMiles").greaterThan(25000)).then(
"Gold").elseCase("XYZ");
e.select(e.get("name"), f.get("name"), e.concat(c, e
.literal("Frequent Flyer")));
String jpql = "SELECT e.name, f.name, CONCAT("
+ " CASE WHEN f.annualMiles > 50000 THEN 'Platinum'"
+ " WHEN f.annualMiles > 25000 THEN 'Gold'"