public class ExpressionImpl<T> extends Object implements Expression<T>
Constructor and Description |
---|
ExpressionImpl(Class<T> cls,
String name,
ExpressionType type)
Constructor for a parameter or variable of this type.
|
ExpressionImpl(org.datanucleus.query.expression.Expression queryExpr)
Constructor taking in the query expression being represented.
|
ExpressionImpl(PersistableExpression parent,
String name)
Constructor, extending a parent, and accessing a member of that parent.
|
Modifier and Type | Method and Description |
---|---|
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.
|
org.datanucleus.query.expression.Expression |
getQueryExpression()
Accessor for the underlying (generic) query expression.
|
BooleanExpression |
instanceOf(Class cls)
Return an expression for whether this expression is an instanceof the supplied class.
|
boolean |
isParameter() |
boolean |
isVariable() |
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.
|
public ExpressionImpl(PersistableExpression parent, String name)
parent
- The parent expression (or null, if candidate)name
- Name of the member to accesspublic ExpressionImpl(Class<T> cls, String name, ExpressionType type)
cls
- The type of the parameter/variablename
- Name of the member to accesstype
- The type, whether parameter or variablepublic ExpressionImpl(org.datanucleus.query.expression.Expression queryExpr)
queryExpr
- The (generic) query expressionpublic org.datanucleus.query.expression.Expression getQueryExpression()
public boolean isParameter()
public boolean isVariable()
public BooleanExpression eq(Expression expr)
Expression
eq
in interface Expression<T>
expr
- Other expressionpublic BooleanExpression eq(T t)
Expression
eq
in interface Expression<T>
t
- Literalpublic BooleanExpression ne(Expression expr)
Expression
ne
in interface Expression<T>
expr
- Other expressionpublic BooleanExpression ne(T t)
Expression
ne
in interface Expression<T>
t
- literalpublic BooleanExpression instanceOf(Class cls)
Expression
instanceOf
in interface Expression<T>
cls
- Class to check againstpublic Expression cast(Class cls)
Expression
cast
in interface Expression<T>
cls
- Class to cast topublic NumericExpression<Long> count()
Expression
count
in interface Expression<T>
public NumericExpression<Long> countDistinct()
Expression
countDistinct
in interface Expression<T>
Copyright © 2017. All rights reserved.