|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.solarmetric.rd.kodo.impl.jdbc.query.listen.SQLEmbed
|
+--com.solarmetric.rd.kodo.impl.jdbc.query.listen.SQLExpression
Simple listener which embeds the argument as an expression into the where clause generated by the query. Listens on "ext:sqlExp".
Example:
"price < 10 || ext:sqlExp (\"(SELECT AVG (PRICE) FROM PRODUCT_TABLE)
> 100\")"
| Field Summary | |
static java.lang.String |
TAG
|
| Constructor Summary | |
SQLExpression()
|
|
| Method Summary | |
java.lang.Object |
evaluate(java.lang.Object target,
java.lang.Object arg,
java.lang.Object candidate,
com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm)
Evaluate the given expression. |
boolean |
expectsArgument()
Return true if this extension expects an argument to act on. |
boolean |
expectsTarget()
Return true if this extension expects a target to act on. |
java.lang.String |
getTag()
Return the tag that this extension listens for. |
boolean |
isExpression()
Return true if this extension is an expression; i.e. |
void |
where(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer buf,
com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue target,
com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue arg,
com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping type,
com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm)
Append the SQL for this expression or value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String TAG
| Constructor Detail |
public SQLExpression()
| Method Detail |
public java.lang.String getTag()
FilterListener
public boolean isExpression()
FilterListenertrue or false on its own.
public boolean expectsArgument()
FilterListenerfield.ext:toUpperCase ().
expectsArgument in interface FilterListenerpublic boolean expectsTarget()
FilterListenerfield.ext:toUpperCase () acts on the target
field but has no arguments, while another possible form,
ext:toUpperCase (field) has no target but does have an
argument.
expectsTarget in interface FilterListener
public java.lang.Object evaluate(java.lang.Object target,
java.lang.Object arg,
java.lang.Object candidate,
com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm)
FilterListener
evaluate in interface FilterListenertarget - the target object / field value to act on; will be
null if this extension does not expect a targetarg - the value of the argument given in the filter; will
be null if this extension does not expect an
argumentcandidate - the candidate object being evaluatedpm - a persistence manager to use if needed
Boolean.TRUE or Boolean.FALSE
public void where(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer buf,
com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue target,
com.solarmetric.rd.kodo.impl.jdbc.query.exp.JDBCValue arg,
com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping type,
com.solarmetric.rd.kodo.runtime.PersistenceManagerImpl pm)
JDBCFilterListener
where in interface JDBCFilterListenerbuf - the SQL buffer to append totarget - the target to act on; this will usually be a
SQLPath, but depending on usage could also be
other values; it will be null if the listener doesn't
expect a targetarg - the value of the argument given in the filter; this
will usually be a Constant, but will be
null if this listener doesn't expect an argumenttype - the class mapping for the query's candidate classpm - the persistence manager that owns the query
|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||