org.apache.openjpa.jdbc.kernel.exps
Class GetColumn

java.lang.Object
  extended by org.apache.openjpa.jdbc.kernel.exps.GetColumn
All Implemented Interfaces:
java.io.Serializable, JDBCFilterListener, org.apache.openjpa.kernel.exps.FilterListener

public class GetColumn
extends java.lang.Object
implements JDBCFilterListener

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\""

See Also:
Serialized Form

Field Summary
static java.lang.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.
 java.lang.Object evaluate(java.lang.Object target, java.lang.Class targetClass, java.lang.Object[] args, java.lang.Class[] argClasses, java.lang.Object candidate, org.apache.openjpa.kernel.StoreContext ctx)
           
 boolean expectsArguments()
           
 boolean expectsTarget()
           
 java.lang.String getTag()
           
 java.lang.Class getType(java.lang.Class targetClass, java.lang.Class[] argClasses)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG

public static final java.lang.String TAG
See Also:
Constant Field Values
Constructor Detail

GetColumn

public GetColumn()
Method Detail

getTag

public java.lang.String getTag()
Specified by:
getTag in interface org.apache.openjpa.kernel.exps.FilterListener

expectsArguments

public boolean expectsArguments()
Specified by:
expectsArguments in interface org.apache.openjpa.kernel.exps.FilterListener

expectsTarget

public boolean expectsTarget()
Specified by:
expectsTarget in interface org.apache.openjpa.kernel.exps.FilterListener

evaluate

public java.lang.Object evaluate(java.lang.Object target,
                                 java.lang.Class targetClass,
                                 java.lang.Object[] args,
                                 java.lang.Class[] argClasses,
                                 java.lang.Object candidate,
                                 org.apache.openjpa.kernel.StoreContext ctx)
Specified by:
evaluate in interface org.apache.openjpa.kernel.exps.FilterListener

appendTo

public void appendTo(SQLBuffer buf,
                     FilterValue target,
                     FilterValue[] args,
                     ClassMapping type,
                     JDBCStore store)
Description copied from interface: JDBCFilterListener
Append the SQL for this expression or value.

Specified by:
appendTo in interface JDBCFilterListener
Parameters:
buf - the SQL buffer to append to
target - the target to act on, or null if the listener doesn't expect a target
args - the values of the arguments given in the filter, or null if this listener doesn't expect arguments
type - the class mapping for the query's candidate class
store - the store that owns the query

getType

public java.lang.Class getType(java.lang.Class targetClass,
                               java.lang.Class[] argClasses)
Specified by:
getType in interface org.apache.openjpa.kernel.exps.FilterListener


Copyright © 2006 Apache Software Foundation. All Rights Reserved.