- Direct Known Subclasses:
- Accessor, ArithmeticExpression, BindVariable, BooleanExpression, ConstantExpression, ExpressionList, Function, NewObjectExpression, SaveValue, SubQueryExpression
public abstract class ValueExpression
- extends Expression
public Object getValue(Object o,
- Description copied from class:
- Get the value for this expression based upon the object passed in. In general
sub-classes should perform some operation on the object to generate their result.
The Query object is provided so that sub-classes can gain access to the
bind variables (if required), save values and so on.
Whilst it may seem better to have the Query object as a member of this class
this would then prevent the expression from being used separately from the Query
(a design goal of JoSQL, i.e. independent processing).
- Specified by:
getValue in class
o - The current object that the expression should be evaluated on.
q - The Query object.
- The value of the expression.
QueryExecutionException - If something goes wrong with gaining the value.
public abstract Object evaluate(Object o,
Copyright © 2008 Gary Bentley. All Rights Reserved.