| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.josql.expressions.Expression
org.josql.expressions.AliasedExpression
public class AliasedExpression
Represents an expression that also has an alias. SELECT columns may have aliases as may the functions in the "EXECUTE ON" clause.
| Field Summary | |
|---|---|
| protected  Expression | exp | 
| Constructor Summary | |
|---|---|
| AliasedExpression() | |
| Method Summary | |
|---|---|
|  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. | 
| Methods inherited from class org.josql.expressions.Expression | 
|---|
| isBracketed, setBracketed | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected Expression exp
| Constructor Detail | 
|---|
public AliasedExpression()
| Method Detail | 
|---|
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().| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||