public class AliasedExpression extends Expression
| Modifier and Type | Field and Description |
|---|---|
protected Expression |
exp |
| Constructor and Description |
|---|
AliasedExpression() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAlias()
Get the alias for the expression.
|
Class |
getExpectedReturnType(Query q)
Get the expected return type for the expression.
|
Expression |
getExpression()
Get the expression being aliased.
|
Object |
getValue(Object o,
Query q)
Get the value for this expression.
|
boolean |
hasFixedResult(Query q)
Return whether this expression has a fixed result.
|
void |
init(Query q)
Init this expression.
|
boolean |
isTrue(Object o,
Query q)
Indicate whether the expression evaluates to
true. |
void |
setAlias(String a) |
void |
setExpression(Expression exp) |
String |
toString()
Return a string representation of the aliased expression.
|
isBracketed, setBracketedprotected Expression exp
public boolean hasFixedResult(Query q)
Expression.hasFixedResult(Query) for more details.hasFixedResult in class Expressionq - The Query object.true if the expression returns a fixed result, false otherwise.public Class getExpectedReturnType(Query q) throws QueryParseException
getExpectedReturnType in class Expressionq - The Query object.QueryParseException - If an error occurs whilst trying to determine the
return type.public void init(Query q) throws QueryParseException
Expression.init(Query).init in class Expressionq - The Query object.QueryParseException - If an error occurs during the initialisation of the
expression.public String getAlias()
public void setAlias(String a)
public Expression getExpression()
public void setExpression(Expression exp)
public boolean isTrue(Object o, Query q) throws QueryExecutionException
true.isTrue in class Expressiono - The object to perform the expression on.q - The Query object.true if the expression evaulates to true, false
otherwise.QueryExecutionException - If something goes wrong during execution of the:
Expression.isTrue(Object,Query) method.Expression.isTrue(Object,Query)public Object getValue(Object o, Query q) throws QueryExecutionException
getValue in class Expressiono - The object to perform the expression on.q - The Query object.Expression.getValue(Object,Query).QueryExecutionException - If something goes wrong with the execution of the
expression.public String toString()
toString in class ExpressionExpression.toString() + AS + getAlias().