Expression<String> cases = new CaseBuilder() .when(c.annualSpending.gt(10000)).then("Premier") .when(c.annualSpending.gt(5000)).then("Gold") .when(c.annualSpending.gt(2000)).then("Silver") .otherwise("Bronze");
602603604605606607608
* Get a builder for a case expression * * @return */ public static CaseBuilder cases() { return new CaseBuilder(); }
148149150151152153154155156157158159
rv.add(expr.count()); rv.add(expr.countDistinct()); } if (!(other instanceof Constant || module == Module.JDO || module == Module.RDFBEAN)) { CaseBuilder cases = new CaseBuilder(); rv.add(NumberConstant.create(1).add(cases .when(expr.gt(10)).then(expr) .when(expr.between(0, 10)).then((NumberExpression<A>)other) .otherwise((NumberExpression<A>)other))); rv.add(expr
205206207208209210211212213214215216
rv.add(expr.substring(1)); rv.add(expr.substring(0, 1)); if (!(other instanceof Constant || module == Module.JDO || module == Module.RDFBEAN)) { CaseBuilder cases = new CaseBuilder(); rv.add(cases.when(expr.eq("A")).then(other) .when(expr.eq("B")).then(expr) .otherwise(other)); rv.add(expr.when("A").then(other) .when("B").then(expr)