|
||||||||||
| 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(Object arg)
Add an argument to the function argument list |
Object |
getArgument(int index)
Return the object representation of the function parameter at the specified index. |
protected List<Object> |
getArgumentList()
Get the full list of function arguments |
Object[] |
getArguments()
Return all the parameters as an object array. |
Column |
getColumn()
Returns the column to which this function is applied. |
String |
getColumnName()
Returns the column name. |
String |
getFullTableName()
Returns the table name prefixed with the schema name if it exists from the function argument(s). |
String |
getSchemaName()
Returns the name of any fixed schema prefix for the column's table (if any) from the function argument(s). |
abstract String |
getSqlExpression()
This should return the SQL string that can be used when constructing the query. |
String |
getTableName()
Returns the name of the associated table (not prefixed by the schema name) from the function argument(s). |
protected void |
setArgumentList(List<Object> args)
Set the full function argument list. |
void |
setArguments(Object[] args)
Sets the function arguments. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractFunction()
| Method Detail |
|---|
public abstract String getSqlExpression()
getSqlExpression in interface Columnpublic Object[] getArguments()
getArguments in interface SQLFunctionpublic void setArguments(Object[] args)
setArguments in interface SQLFunctionargs - the function arguments, not null.public Column getColumn()
getColumn in interface SQLFunctionIllegalStateException - if the column cannot be determined.public Object getArgument(int index)
getArgument in interface SQLFunctionindex - The 0 based index of the parameter to get.
protected void addArgument(Object arg)
arg - The argument object.protected void setArgumentList(List<Object> args)
args - The new argument listprotected List<Object> getArgumentList()
public String getColumnName()
getColumnName in interface Columnpublic String getTableName()
getTableName in interface Columnpublic String getSchemaName()
getSchemaName in interface Columnpublic String getFullTableName()
getFullTableName in interface Column
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||