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:
- Dynamically configure the query options based on the arguments (i.e. ordering, query optimization... etc.).
- Dynamically define the selection criteria based on the arguments.
- Pass Query By Example objects or Expressions as the arguments.
- Post processing of the query results.
- Perform multiple queries or non-TopLink operations.
- Since:
- TOPLink/Java 3.0
- See Also:
MethodBaseQueryRedirector, Serialized Form
| Type | Method |
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 |
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.
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.