oracle.toplink.queryframework
Class MethodBaseQueryRedirector

java.lang.Object
  |
  +--oracle.toplink.queryframework.MethodBaseQueryRedirector
All Implemented Interfaces:
QueryRedirector, java.io.Serializable

public class MethodBaseQueryRedirector
extends java.lang.Object
implements QueryRedirector

Purpose: Query redirection allows for a named or parameterized query (or finder) to dynamically determine how the query is to be executed based on the arguments.

Description: This implementor of query redirection calls a static method on a class to perform the query execution. Redirection can be used to:

Since:
TOPLink/Java 3.0
See Also:
MethodBaseQueryRedirector, Serialized Form

Constructor Summary
MethodBaseQueryRedirector()
          PUBLIC: Return the new query redirector.
MethodBaseQueryRedirector(java.lang.Class methodClass, java.lang.String methodName)
          PUBLIC: Return the new query redirector based on the static method in the class.
 
Method Summary
TypeMethod
 java.lang.Class getMethodClass()
          PUBLIC: Return the class to execute the static method on.
 java.lang.String getMethodName()
          PUBLIC: Return the name of the static method.
 void setMethodClass(java.lang.Class newMethodClass)
          PUBLIC: Set the class to execute the static method on.
 void setMethodName(java.lang.String newMethodName)
          PUBLIC: Set the name of the static method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodBaseQueryRedirector

public MethodBaseQueryRedirector()
PUBLIC: Return the new query redirector.

MethodBaseQueryRedirector

public MethodBaseQueryRedirector(java.lang.Class methodClass,
                                 java.lang.String methodName)
PUBLIC: Return the new query redirector based on the static method in the class.
Method Detail

getMethodClass

public java.lang.Class getMethodClass()
PUBLIC: Return the class to execute the static method on.

getMethodName

public java.lang.String getMethodName()
PUBLIC: Return the name of the static method. This method must be public, static and have argument of DatabaseQuery, Vector, Sesssion.

setMethodClass

public void setMethodClass(java.lang.Class newMethodClass)
PUBLIC: Set the class to execute the static method on.

setMethodName

public void setMethodName(java.lang.String newMethodName)
PUBLIC: Set the name of the static method. This method must be public, static and have argument of DatabaseQuery, DatabaseRow, Sesssion. The DatabaseQuery argument is the query that is currently being executed. The DatabaseRow will contain the Argument names added to the Query through addArgument(Sting) or, in the case of an Object query, the object attribute field names. These names will reference the argument values passed into the query, or in the case of an Object Query the values from the object. The session argument is the session that the query is currently being executed on.