|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.torque.util.functions.AbstractFunction
org.apache.torque.util.functions.Aggregate.AgregateFunction
public abstract class Aggregate.AgregateFunction
The base class for all the standard aggregate function classes.
| Constructor Summary | |
|---|---|
protected |
Aggregate.AgregateFunction()
Base constructor for aggregate functions which must be created via the FunctionFactory / DB classes. |
| Method Summary | |
|---|---|
java.lang.String |
getArgument(int index)
Return a string representation of the function parameter at the specified index. |
protected java.lang.String |
getFunction()
Get the function name to use, e.g. |
boolean |
isDistinct()
Should the column have DISTINCT added in front of it? |
void |
setArguments(java.lang.Object[] args)
Assumes that there are one or two arguments being specified. |
void |
setFunction(java.lang.String value)
Set the function to use. |
java.lang.String |
toSQL()
Generate the SQL for this function. |
| Methods inherited from class org.apache.torque.util.functions.AbstractFunction |
|---|
addArgument, getArgumentList, getArgumentObject, getArguments, getDBName, setArgumentList, setDBName |
| 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 |
|---|
getArguments, getDBName, setDBName |
| Constructor Detail |
|---|
protected Aggregate.AgregateFunction()
FunctionFactory,
DB| Method Detail |
|---|
public void setArguments(java.lang.Object[] args)
throws java.lang.IllegalArgumentException
setArguments in interface SQLFunctionargs - The column to apply the function to.
java.lang.IllegalArgumentException - If at least one argument has not
been supplied or the second argument
object is not Boolean.public boolean isDistinct()
protected java.lang.String getFunction()
public void setFunction(java.lang.String value)
value - The function to use.
public java.lang.String toSQL()
throws java.lang.IllegalStateException
toSQL in interface SQLFunctiontoSQL in class AbstractFunctionjava.lang.IllegalStateExceptionpublic java.lang.String getArgument(int index)
AbstractFunction
getArgument in interface SQLFunctiongetArgument in class AbstractFunctionindex - The 0 based parameter to get.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||