org.datanucleus.query.typesafe
Interface Expression<T>

Type Parameters:
T - Java type being represented here
All Known Subinterfaces:
BooleanExpression, ByteExpression, CharacterExpression, CollectionExpression<T,E>, ComparableExpression<T>, DateExpression<T>, DateTimeExpression<T>, EnumExpression<T>, ListExpression<T,E>, MapExpression<T,K,V>, NumericExpression<T>, ObjectExpression<T>, PersistableExpression<T>, StringExpression, TemporalExpression<T>, TimeExpression<T>
All Known Implementing Classes:
BooleanExpressionImpl, ByteExpressionImpl, CharacterExpressionImpl, CollectionExpressionImpl, ComparableExpressionImpl, DateExpressionImpl, DateTimeExpressionImpl, EnumExpressionImpl, ExpressionImpl, ListExpressionImpl, MapExpressionImpl, NumericExpressionImpl, ObjectExpressionImpl, PersistableExpressionImpl, StringExpressionImpl, TimeExpressionImpl

public interface Expression<T>

Representation of an expression in a query.


Method Summary
 Expression cast(java.lang.Class cls)
          Return an expression where this expression is cast to the specified type.
 NumericExpression<java.lang.Long> count()
          Method to return a numeric expression representing the aggregated count of this expression.
 NumericExpression<java.lang.Long> countDistinct()
          Method to return a numeric expression representing the aggregated (distinct) count of this expression.
 BooleanExpression eq(Expression expr)
          Method returning whether this expression equals the other expression.
 BooleanExpression eq(T t)
          Method returning whether this expression equals the literal.
 BooleanExpression instanceOf(java.lang.Class cls)
          Return an expression for whether this expression is an instanceof the supplied class.
 BooleanExpression ne(Expression expr)
          Method returning whether this expression doesn't equal the other expression.
 BooleanExpression ne(T t)
          Method returning whether this expression doesn't equal the literal.
 

Method Detail

eq

BooleanExpression eq(Expression expr)
Method returning whether this expression equals the other expression.

Parameters:
expr - Other expression
Returns:
Whether they are equal

eq

BooleanExpression eq(T t)
Method returning whether this expression equals the literal.

Parameters:
t - Literal
Returns:
Whether they are equal

ne

BooleanExpression ne(Expression expr)
Method returning whether this expression doesn't equal the other expression.

Parameters:
expr - Other expression
Returns:
Whether they are not equal

ne

BooleanExpression ne(T t)
Method returning whether this expression doesn't equal the literal.

Parameters:
t - literal
Returns:
Whether they are not equal

count

NumericExpression<java.lang.Long> count()
Method to return a numeric expression representing the aggregated count of this expression.

Returns:
Numeric expression for the count

countDistinct

NumericExpression<java.lang.Long> countDistinct()
Method to return a numeric expression representing the aggregated (distinct) count of this expression.

Returns:
Numeric expression for the distinct count

instanceOf

BooleanExpression instanceOf(java.lang.Class cls)
Return an expression for whether this expression is an instanceof the supplied class.

Parameters:
cls - Class to check against
Returns:
Whether it is an instanceof

cast

Expression cast(java.lang.Class cls)
Return an expression where this expression is cast to the specified type.

Parameters:
cls - Class to cast to
Returns:
The cast expression


Copyright © 2011. All Rights Reserved.