getValue
public Object getValue(Object o,
Query q)
throws QueryExecutionException
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 Expression
- Parameters:
o
- The current object that the expression should be evaluated on.
q
- The Query object.
- Returns:
- The value of the expression.
- Throws:
QueryExecutionException
- If something goes wrong with gaining the value.