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

java.lang.Object
  extended by com.mysema.query.types.Expr<D>
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ESimple

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 is bound to.

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

Field Summary
protected  boolean primitive
           
 
Constructor Summary
Expr(Class<? extends D> type)
           
 
Method Summary
abstract  void accept(Visitor v)
           
abstract  Expr<D> as(Path<D> alias)
           
 Expr<D> asExpr()
          Used for safe casts from Path, SubQuery, Operation and Custom to Expr
abstract  ENumber<Long> count()
          Get the count(this) expression
abstract  ENumber<Long> countDistinct()
          Get the count(distinct this) expression
abstract  EBoolean eq(D right)
          Get a this == right expression
abstract  EBoolean eq(Expr<? super D> right)
          Get a this == right expression
abstract  boolean equals(Object o)
           
 Class<? extends D> getType()
          Get the Java type for this expression
 int hashCode()
           
abstract  EBoolean in(Collection<? extends D> right)
          Get a this in right expression
abstract  EBoolean in(D... right)
          Get a this in right expression
abstract  EBoolean in(ECollection<?,? extends D> right)
          Get a this in right expression
abstract  EBoolean ne(D right)
          Get a this <> right expression
abstract  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()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

primitive

protected final boolean primitive
Constructor Detail

Expr

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

accept

public abstract void accept(Visitor v)

asExpr

public final Expr<D> asExpr()
Used for safe casts from Path, SubQuery, Operation and Custom to Expr

Returns:

as

public abstract Expr<D> as(Path<D> alias)

count

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

Returns:
count(this)

countDistinct

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

Returns:
count(distinct this)

eq

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

Parameters:
right - rhs of the comparison
Returns:

eq

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

Parameters:
right - rhs of the comparison
Returns:

getType

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

Returns:

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public abstract boolean equals(Object o)
Overrides:
equals in class Object

in

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

Parameters:
right - rhs of the comparison
Returns:

in

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

Parameters:
right - rhs of the comparison
Returns:

in

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

Parameters:
right - rhs of the comparison
Returns:

ne

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

Parameters:
right - rhs of the comparison
Returns:

ne

public abstract 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 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


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