com.mysema.query.types.expr
Class Coalesce<T extends Comparable>

java.lang.Object
  extended by com.mysema.query.types.ExpressionBase<T>
      extended by com.mysema.query.types.expr.SimpleExpression<T>
          extended by com.mysema.query.types.expr.ComparableExpressionBase<T>
              extended by com.mysema.query.types.expr.ComparableExpression<T>
                  extended by com.mysema.query.types.expr.Coalesce<T>
Type Parameters:
T - expression type
All Implemented Interfaces:
Expression<T>, Serializable

public class Coalesce<T extends Comparable>
extends ComparableExpression<T>

Coalesce defines a coalesce function invocation. The coalesce function returns null if all arguments are null and the first non-null argument otherwise

Author:
tiwe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.mysema.query.types.expr.SimpleExpression
primitive
 
Fields inherited from class com.mysema.query.types.ExpressionBase
type
 
Constructor Summary
Coalesce(Class<? extends T> type, Expression... exprs)
           
Coalesce(Expression... exprs)
           
 
Method Summary
<R,C> R
accept(Visitor<R,C> v, C context)
          Accept the visitor with the given context
 Coalesce<T> add(Expression<T> expr)
           
 Coalesce<T> add(T constant)
           
 DateExpression<T> asDate()
           
 DateTimeExpression<T> asDateTime()
           
 NumberExpression<?> asNumber()
           
 StringExpression asString()
           
 TimeExpression<T> asTime()
           
 boolean equals(Object o)
           
 int hashCode()
           
 
Methods inherited from class com.mysema.query.types.expr.ComparableExpression
as, as, between, between, goe, goe, gt, gt, loe, loe, lt, lt, notBetween, notBetween
 
Methods inherited from class com.mysema.query.types.expr.ComparableExpressionBase
asc, castToNum, desc, stringValue
 
Methods inherited from class com.mysema.query.types.expr.SimpleExpression
count, countDistinct, eq, eq, in, in, in, isNotNull, isNull, ne, ne, notIn, notIn, notIn, when, when
 
Methods inherited from class com.mysema.query.types.ExpressionBase
getType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Coalesce

public Coalesce(Class<? extends T> type,
                Expression... exprs)

Coalesce

public Coalesce(Expression... exprs)
Method Detail

accept

public <R,C> R accept(Visitor<R,C> v,
                      C context)
Description copied from interface: Expression
Accept the visitor with the given context

Type Parameters:
R - return type
C - context type
Parameters:
v - visitor
context - context of visit
Returns:

add

public final Coalesce<T> add(Expression<T> expr)

add

public final Coalesce<T> add(T constant)

asDate

public DateExpression<T> asDate()

asDateTime

public DateTimeExpression<T> asDateTime()

asNumber

public NumberExpression<?> asNumber()

asString

public StringExpression asString()

asTime

public TimeExpression<T> asTime()

equals

public boolean equals(Object o)
Specified by:
equals in class SimpleExpression<T extends Comparable>

hashCode

public int hashCode()
Overrides:
hashCode in class SimpleExpression<T extends Comparable>


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