com.mysema.query.types.expr
Class CaseBuilder

java.lang.Object
  extended by com.mysema.query.types.expr.CaseBuilder

public final class CaseBuilder
extends Object

CaseBuilder enables the construction of typesafe case-when-then-else constructs : e.g.

 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");
 

Author:
tiwe

Nested Class Summary
static class CaseBuilder.Cases<A,Q extends Expression<A>>
          Cascading typesafe Case builder
static class CaseBuilder.CaseWhen<A,Q extends Expression<A>>
          Intermediate When state
static class CaseBuilder.Initial
          Initial state of Case construction
 
Constructor Summary
CaseBuilder()
           
 
Method Summary
 CaseBuilder.Initial when(BooleanExpression b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaseBuilder

public CaseBuilder()
Method Detail

when

public CaseBuilder.Initial when(BooleanExpression b)


Copyright © 2007-2012 Mysema Ltd. All Rights Reserved.