Package javax.jdo.query
Interface Expression<T>
-
- Type Parameters:
T
- Java type being represented here
- All Known Subinterfaces:
BooleanExpression
,ByteExpression
,CharacterExpression
,CollectionExpression<T,E>
,ComparableExpression<T>
,DateExpression
,DateTimeExpression
,EnumExpression<T>
,GeometryCollectionExpression<T>
,GeometryExpression<T>
,IfThenElseExpression<T>
,LinearRingExpression<T>
,LineStringExpression<T>
,ListExpression<T,E>
,LocalDateExpression
,LocalDateTimeExpression
,LocalTimeExpression
,MapExpression<T,K,V>
,MultiLineStringExpression<T>
,MultiPointExpression<T>
,MultiPolygonExpression<T>
,NumericExpression<T>
,ObjectExpression<T>
,OptionalExpression<T>
,PersistableExpression<T>
,PointExpression<T>
,PolygonExpression<T>
,StringExpression
,TimeExpression
public interface Expression<T>
Representation of an expression in a query.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Expression<T>
as(String alias)
Method to set the alias for this expression when used in the result clause.Expression
cast(Class cls)
Return an expression where this expression is cast to the specified type.NumericExpression<Long>
count()
Method to return a numeric expression representing the aggregated count of this expression.NumericExpression<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(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
-
as
Expression<T> as(String alias)
Method to set the alias for this expression when used in the result clause.- Parameters:
alias
- The alias- Returns:
- This expression
-
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<Long> count()
Method to return a numeric expression representing the aggregated count of this expression.- Returns:
- Numeric expression for the count
-
countDistinct
NumericExpression<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(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(Class cls)
Return an expression where this expression is cast to the specified type.- Parameters:
cls
- Class to cast to- Returns:
- The cast expression
-
-