com.mysema.query.types.expr
Class ComparableExpression<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>
Type Parameters:
T - expression type
All Implemented Interfaces:
Expression<T>, Serializable
Direct Known Subclasses:
BooleanExpression, Coalesce, ComparableOperation, ComparablePath, ComparableSubQuery, ComparableTemplate, EnumExpression, StringExpression, TemporalExpression

public abstract class ComparableExpression<T extends Comparable>
extends ComparableExpressionBase<T>

ComparableExpression extends ComparableExpressionBase to provide comparison methods.

Author:
tiwe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.mysema.query.types.expr.SimpleExpression
primitive
 
Constructor Summary
ComparableExpression(Class<? extends T> type)
           
 
Method Summary
 ComparableExpression<T> as(Path<T> alias)
          Create an alias for the expression
 ComparableExpression<T> as(String alias)
          Create an alias for the expression
 BooleanExpression between(Expression<T> from, Expression<T> to)
          Get a first <= this <= second expression
 BooleanExpression between(T from, T to)
          Get a from <= this <= to expression
 BooleanExpression goe(Expression<T> right)
          Get a this >= right expression
 BooleanExpression goe(T right)
          Get a this >= right expression
 BooleanExpression gt(Expression<T> right)
          Get a this > right expression
 BooleanExpression gt(T right)
          Get a this > right expression
 BooleanExpression loe(Expression<T> right)
          Get a this < right expression
 BooleanExpression loe(T right)
          Get a this <= right expression
 BooleanExpression lt(Expression<T> right)
          Get a this < right expression
 BooleanExpression lt(T right)
          Get a this < right expression
 BooleanExpression notBetween(Expression<T> from, Expression<T> to)
          Get a this not between from and to expression
 BooleanExpression notBetween(T from, T to)
          Get a this not between from and to expression
 
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, equals, hashCode, 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
 
Methods inherited from interface com.mysema.query.types.Expression
accept
 

Constructor Detail

ComparableExpression

public ComparableExpression(Class<? extends T> type)
Method Detail

as

public ComparableExpression<T> as(Path<T> alias)
Description copied from class: SimpleExpression
Create an alias for the expression

Overrides:
as in class SimpleExpression<T extends Comparable>
Returns:

as

public ComparableExpression<T> as(String alias)
Description copied from class: SimpleExpression
Create an alias for the expression

Overrides:
as in class SimpleExpression<T extends Comparable>
Returns:

between

public final BooleanExpression between(@Nullable
                                       T from,
                                       @Nullable
                                       T to)
Get a from <= this <= to expression

Parameters:
from -
to -
Returns:

between

public final BooleanExpression between(@Nullable
                                       Expression<T> from,
                                       @Nullable
                                       Expression<T> to)
Get a first <= this <= second expression

Parameters:
from -
to -
Returns:

notBetween

public final BooleanExpression notBetween(T from,
                                          T to)
Get a this not between from and to expression

Parameters:
from -
to -
Returns:

notBetween

public final BooleanExpression notBetween(Expression<T> from,
                                          Expression<T> to)
Get a this not between from and to expression

Parameters:
from -
to -
Returns:

gt

public BooleanExpression gt(T right)
Get a this > right expression

Parameters:
right - rhs of the comparison
Returns:
See Also:
Comparable.compareTo(Object)

gt

public BooleanExpression gt(Expression<T> right)
Get a this > right expression

Parameters:
right - rhs of the comparison
Returns:
See Also:
Comparable.compareTo(Object)

goe

public BooleanExpression goe(T right)
Get a this >= right expression

Parameters:
right - rhs of the comparison
Returns:
See Also:
Comparable.compareTo(Object)

goe

public BooleanExpression goe(Expression<T> right)
Get a this >= right expression

Parameters:
right - rhs of the comparison
Returns:
See Also:
Comparable.compareTo(Object)

lt

public final BooleanExpression lt(T right)
Get a this < right expression

Parameters:
right - rhs of the comparison
Returns:
See Also:
Comparable.compareTo(Object)

lt

public final BooleanExpression lt(Expression<T> right)
Get a this < right expression

Parameters:
right - rhs of the comparison
Returns:
See Also:
Comparable.compareTo(Object)

loe

public final BooleanExpression loe(T right)
Get a this <= right expression

Parameters:
right - rhs of the comparison
Returns:
See Also:
Comparable.compareTo(Object)

loe

public final BooleanExpression loe(Expression<T> right)
Get a this < right expression

Parameters:
right - rhs of the comparison
Returns:
See Also:
Comparable.compareTo(Object)


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