|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.kernel.exps.GetColumn
public class GetColumn
Returns the SQL alias of the named column for use in a query. Note that
to retrieve columns in the table of the candidate object, you must
explicitly qualify the extension with this, as demonstrated
in the second example below.
Examples:
"company.address.ext:getColumn (\"ID\") == 5"
"this.ext:getColumn (\"CLS\") == \"org.apache.openjpa.example.Person\""
| Field Summary | |
|---|---|
static String |
TAG
|
| Constructor Summary | |
|---|---|
GetColumn()
|
|
| Method Summary | |
|---|---|
void |
appendTo(SQLBuffer buf,
FilterValue target,
FilterValue[] args,
ClassMapping type,
JDBCStore store)
Append the SQL for this expression or value. |
Object |
evaluate(Object target,
Class targetClass,
Object[] args,
Class[] argClasses,
Object candidate,
StoreContext ctx)
Evaluate the given expression. |
boolean |
expectsArguments()
Return true if this extension expects arguments to act on. |
boolean |
expectsTarget()
Return true if this extension expects a target to act on. |
String |
getTag()
Return the tag that this extension listens for. |
Class |
getType(Class targetClass,
Class[] argClasses)
Return the expected type of the result of this listener. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TAG
| Constructor Detail |
|---|
public GetColumn()
| Method Detail |
|---|
public String getTag()
FilterListener
getTag in interface FilterListenerpublic boolean expectsArguments()
FilterListenerfield.ext:toUpperCase ().
expectsArguments 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 Object evaluate(Object target,
Class targetClass,
Object[] args,
Class[] argClasses,
Object candidate,
StoreContext ctx)
FilterListener
evaluate in interface FilterListenertarget - the target object / field value to act on; will be
null if this extension does not expect a targettargetClass - the expected class of the target; given in case
the target evaluates to null and typing is neededargs - the values of the arguments given in the filter;
will be null if this extension does not expect an argumentargClasses - the expected classes of the arguments; given in case
an argument evaluates to null and typing is neededcandidate - the candidate object being evaluatedctx - the persistence context
Boolean.TRUE or Boolean.FALSE
public void appendTo(SQLBuffer buf,
FilterValue target,
FilterValue[] args,
ClassMapping type,
JDBCStore store)
JDBCFilterListener
appendTo in interface JDBCFilterListenerbuf - the SQL buffer to append totarget - the target to act on, or null if the listener
doesn't expect a targetargs - the values of the arguments given in the filter, or
null if this listener doesn't expect argumentstype - the class mapping for the query's candidate classstore - the store that owns the query
public Class getType(Class targetClass,
Class[] argClasses)
FilterListener
getType in interface FilterListenertargetClass - the expected class of the target, or null if no targetargClasses - the expected classes of the arguments, or null if
no arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||