com.mysema.query.types.expr
Class Expr<D>

java.lang.Object
  extended by com.mysema.query.types.expr.Expr<D>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CSimple, ECollectionBase, EComparableBase, EConstructor, EMapBase, ExprConst, ObjectSubQuery, OSimple, PArray, PEntity, PSimple

public abstract class Expr<D>
extends Object
implements Serializable

Expr represents a general typed expression in a Query instance. The generic type parameter is a reference to the type the expression instance is bound to.

Version:
$Id$
Author:
tiwe
See Also:
Serialized Form

Constructor Summary
Expr(Class<? extends D> type)
           
 
Method Summary
abstract  void accept(Visitor v)
           
 ENumber<Long> count()
          Get the count(this) expression
static ENumber<Long> countAll()
          Get the count(*) expression
 ENumber<Long> countDistinct()
          Get the count(distinct this) expression
 EBoolean eq(D right)
          Get a this == right expression
 EBoolean eq(Expr<? super D> right)
          Get a this == right expression
 Class<? extends D> getType()
          Get the Java type for this expression
 int hashCode()
           
 EBoolean in(Collection<? extends D> right)
          Get a this in right expression
 EBoolean in(D... right)
          Get a this in right expression
 EBoolean in(ECollection<?,? extends D> right)
          Get a this in right expression
 EBoolean ne(D right)
          Get a this <> right expression
 EBoolean ne(Expr<? super D> right)
          Get a this <> right expression
 EBoolean notIn(Collection<? extends D> right)
          Get a this not in right expression
 EBoolean notIn(D... right)
          Get a this not in right expression
 EBoolean notIn(ECollection<?,? extends D> right)
          Get a this not in right expression
 String toString()
           
 CaseForEqBuilder<D> when(D other)
           
 CaseForEqBuilder<D> when(Expr<? extends D> other)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Expr

public Expr(Class<? extends D> type)
Method Detail

countAll

public static ENumber<Long> countAll()
Get the count(*) expression

Returns:
count(*)

accept

public abstract void accept(Visitor v)

count

public ENumber<Long> count()
Get the count(this) expression

Returns:
count(this)

countDistinct

public ENumber<Long> countDistinct()
Get the count(distinct this) expression

Returns:
count(distinct this)

eq

public EBoolean eq(D right)
Get a this == right expression

Parameters:
right - rhs of the comparison
Returns:

eq

public final EBoolean eq(Expr<? super D> right)
Get a this == right expression

Parameters:
right - rhs of the comparison
Returns:

getType

public Class<? extends D> getType()
Get the Java type for this expression

Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class Object

in

public final EBoolean in(Collection<? extends D> right)
Get a this in right expression

Parameters:
right - rhs of the comparison
Returns:

in

public final EBoolean in(D... right)
Get a this in right expression

Parameters:
right - rhs of the comparison
Returns:

in

public final EBoolean in(ECollection<?,? extends D> right)
Get a this in right expression

Parameters:
right - rhs of the comparison
Returns:

ne

public EBoolean ne(D right)
Get a this <> right expression

Parameters:
right - rhs of the comparison
Returns:

ne

public final EBoolean ne(Expr<? super D> right)
Get a this <> right expression

Parameters:
right - rhs of the comparison
Returns:

notIn

public final EBoolean notIn(Collection<? extends D> right)
Get a this not in right expression

Parameters:
right - rhs of the comparison
Returns:

notIn

public final EBoolean notIn(D... right)
Get a this not in right expression

Parameters:
right - rhs of the comparison
Returns:

notIn

public final EBoolean notIn(ECollection<?,? extends D> right)
Get a this not in right expression

Parameters:
right - rhs of the comparison
Returns:

toString

public final String toString()
Overrides:
toString in class Object

when

public CaseForEqBuilder<D> when(D other)
Parameters:
other -
Returns:

when

public CaseForEqBuilder<D> when(Expr<? extends D> other)
Parameters:
other -
Returns:


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