org.datanucleus.jdo.query
Class ComparableExpressionImpl<T>

java.lang.Object
  extended by org.datanucleus.jdo.query.ExpressionImpl<T>
      extended by org.datanucleus.jdo.query.ComparableExpressionImpl<T>
All Implemented Interfaces:
ComparableExpression<T>, Expression<T>
Direct Known Subclasses:
BooleanExpressionImpl, ByteExpressionImpl, CharacterExpressionImpl, DateExpressionImpl, DateTimeExpressionImpl, EnumExpressionImpl, NumericExpressionImpl, StringExpressionImpl, TimeExpressionImpl

public class ComparableExpressionImpl<T>
extends ExpressionImpl<T>
implements ComparableExpression<T>

Implementation of the methods for ComparableExpression.


Constructor Summary
ComparableExpressionImpl(java.lang.Class<T> cls, java.lang.String name, ExpressionType type)
           
ComparableExpressionImpl(Expression queryExpr)
           
ComparableExpressionImpl(PersistableExpression parent, java.lang.String name)
           
 
Method Summary
 OrderExpression asc()
          Method to return an order expression for this expression in ascending order.
 OrderExpression desc()
          Method to return an order expression for this expression in descending order.
 BooleanExpression gt(ComparableExpression expr)
          Method returning whether this expression is greater than the other expression.
 BooleanExpression gt(T t)
          Method returning whether this expression is greater than the literal.
 BooleanExpression gteq(ComparableExpression expr)
          Method returning whether this expression is greater than or equal the other expression.
 BooleanExpression gteq(T t)
          Method returning whether this expression is greater than or equal the literal.
 BooleanExpression lt(ComparableExpression expr)
          Method returning whether this expression is less than the other expression.
 BooleanExpression lt(T t)
          Method returning whether this expression is less than the literal.
 BooleanExpression lteq(ComparableExpression expr)
          Method returning whether this expression is less than or equal the other expression.
 BooleanExpression lteq(T t)
          Method returning whether this expression is less than or equal the literal.
 NumericExpression max()
          Method to return a numeric expression representing the aggregated maximum of this expression.
 NumericExpression min()
          Method to return a numeric expression representing the aggregated minimum of this expression.
 
Methods inherited from class org.datanucleus.jdo.query.ExpressionImpl
cast, count, countDistinct, eq, eq, getQueryExpression, instanceOf, isParameter, isVariable, ne, ne
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.datanucleus.query.typesafe.Expression
cast, count, countDistinct, eq, eq, instanceOf, ne, ne
 

Constructor Detail

ComparableExpressionImpl

public ComparableExpressionImpl(PersistableExpression parent,
                                java.lang.String name)

ComparableExpressionImpl

public ComparableExpressionImpl(Expression queryExpr)

ComparableExpressionImpl

public ComparableExpressionImpl(java.lang.Class<T> cls,
                                java.lang.String name,
                                ExpressionType type)
Method Detail

gt

public BooleanExpression gt(ComparableExpression expr)
Description copied from interface: ComparableExpression
Method returning whether this expression is greater than the other expression.

Specified by:
gt in interface ComparableExpression<T>
Parameters:
expr - Other expression
Returns:
Whether this is greater than the other

gt

public BooleanExpression gt(T t)
Description copied from interface: ComparableExpression
Method returning whether this expression is greater than the literal.

Specified by:
gt in interface ComparableExpression<T>
Parameters:
t - literal
Returns:
Whether this is greater than the other

gteq

public BooleanExpression gteq(ComparableExpression expr)
Description copied from interface: ComparableExpression
Method returning whether this expression is greater than or equal the other expression.

Specified by:
gteq in interface ComparableExpression<T>
Parameters:
expr - Other expression
Returns:
Whether this is greater than or equal to the other

gteq

public BooleanExpression gteq(T t)
Description copied from interface: ComparableExpression
Method returning whether this expression is greater than or equal the literal.

Specified by:
gteq in interface ComparableExpression<T>
Parameters:
t - literal
Returns:
Whether this is greater than or equal to the other

lt

public BooleanExpression lt(ComparableExpression expr)
Description copied from interface: ComparableExpression
Method returning whether this expression is less than the other expression.

Specified by:
lt in interface ComparableExpression<T>
Parameters:
expr - Other expression
Returns:
Whether this is less than the other

lt

public BooleanExpression lt(T t)
Description copied from interface: ComparableExpression
Method returning whether this expression is less than the literal.

Specified by:
lt in interface ComparableExpression<T>
Parameters:
t - literal
Returns:
Whether this is less than the other

lteq

public BooleanExpression lteq(ComparableExpression expr)
Description copied from interface: ComparableExpression
Method returning whether this expression is less than or equal the other expression.

Specified by:
lteq in interface ComparableExpression<T>
Parameters:
expr - Other expression
Returns:
Whether this is less than or equal the other

lteq

public BooleanExpression lteq(T t)
Description copied from interface: ComparableExpression
Method returning whether this expression is less than or equal the literal.

Specified by:
lteq in interface ComparableExpression<T>
Parameters:
t - literal
Returns:
Whether this is less than or equal the other

max

public NumericExpression max()
Description copied from interface: ComparableExpression
Method to return a numeric expression representing the aggregated maximum of this expression.

Specified by:
max in interface ComparableExpression<T>
Returns:
Numeric expression for the maximum

min

public NumericExpression min()
Description copied from interface: ComparableExpression
Method to return a numeric expression representing the aggregated minimum of this expression.

Specified by:
min in interface ComparableExpression<T>
Returns:
Numeric expression for the minimum

asc

public OrderExpression asc()
Description copied from interface: ComparableExpression
Method to return an order expression for this expression in ascending order.

Specified by:
asc in interface ComparableExpression<T>
Returns:
The order expression

desc

public OrderExpression desc()
Description copied from interface: ComparableExpression
Method to return an order expression for this expression in descending order.

Specified by:
desc in interface ComparableExpression<T>
Returns:
The order expression


Copyright © 2011. All Rights Reserved.