|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.torque.util.functions.AbstractFunction
public abstract class AbstractFunction
A default framework that implements the core SQLFunction interface requirements that can be used to build specific functions on.
| Constructor Summary | |
|---|---|
protected |
AbstractFunction()
Functions should only be created via the FunctionFactory class. |
| Method Summary | |
|---|---|
protected void |
addArgument(java.lang.Object arg)
Add an argument to the function argument list |
abstract java.lang.String |
getArgument(int i)
Return a string representation of the function parameter at the specified index. |
protected java.util.List |
getArgumentList()
Get the full list of function arguments |
protected java.lang.Object |
getArgumentObject(int index)
Return the object representation of the function parameter at the specified index. |
java.lang.Object[] |
getArguments()
Return all the parameters as an object array. |
java.lang.String |
getDBName()
Get the name of the Torque Database associated with this function. |
protected void |
setArgumentList(java.util.List args)
Set the full function argument list. |
void |
setDBName(java.lang.String dbName)
Sets the Torque DB name this function is being used with. |
abstract java.lang.String |
toSQL()
This should return the SQL string that can be used when constructing the query. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.torque.util.functions.SQLFunction |
|---|
setArguments |
| Constructor Detail |
|---|
protected AbstractFunction()
| Method Detail |
|---|
public abstract java.lang.String toSQL()
toSQL in interface SQLFunctionpublic abstract java.lang.String getArgument(int i)
getArgument in interface SQLFunctionindex - The 0 based index of the parameter to get.
public java.lang.Object[] getArguments()
getArguments in interface SQLFunction
public java.lang.String getDBName()
throws java.lang.IllegalStateException
getDBName in interface SQLFunctionjava.lang.IllegalStateException - If Torque has not been initialized and
the default DB name can not be determined.protected java.lang.Object getArgumentObject(int index)
index - The 0 based index of the parameter to get.
protected void addArgument(java.lang.Object arg)
arg - The argument object.protected void setArgumentList(java.util.List args)
args - The new argument listprotected java.util.List getArgumentList()
public void setDBName(java.lang.String dbName)
SQLFunction
setDBName in interface SQLFunctiondbName - the dbName to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||