|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mckoi.database.AbstractFunction
public abstract class AbstractFunction
An abstract implementation of Function.
Constructor Summary | |
---|---|
AbstractFunction(java.lang.String name,
Expression[] params)
Constructs the Function with the given expression array as parameters. |
Method Summary | |
---|---|
java.util.List |
allElements()
Returns the list of all elements that are used by this function. |
java.util.List |
allVariables()
Returns the list of all Variable's that are used by this function. |
java.lang.String |
getName()
Returns the name of the function. |
Expression |
getParameter(int n)
Returns the parameter at the given index in the parameters list. |
void |
init(VariableResolver resolver)
The init function. |
boolean |
isAggregate(QueryContext context)
Returns whether the function is an aggregate function or not. |
boolean |
isGlob()
Returns true if the param is the special case glob parameter (*). |
int |
parameterCount()
Returns the number of parameters for this function. |
void |
prepareParameters(ExpressionPreparer preparer)
Prepares the parameters of the function. |
TType |
returnTType()
|
TType |
returnTType(VariableResolver resolver,
QueryContext context)
By Default, we assume a function returns a Numeric object. |
protected void |
setAggregate(boolean status)
Call this from the constructor if the function is an aggregate. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.mckoi.database.Function |
---|
evaluate |
Constructor Detail |
---|
public AbstractFunction(java.lang.String name, Expression[] params)
Method Detail |
---|
protected void setAggregate(boolean status)
public int parameterCount()
public Expression getParameter(int n)
public boolean isGlob()
public java.lang.String getName()
getName
in interface Function
public java.util.List allVariables()
allVariables
in interface Function
public java.util.List allElements()
allElements
in interface Function
public final boolean isAggregate(QueryContext context)
isAggregate
in interface Function
public void prepareParameters(ExpressionPreparer preparer) throws DatabaseException
prepareParameters
in interface Function
DatabaseException
public void init(VariableResolver resolver)
public TType returnTType(VariableResolver resolver, QueryContext context)
returnTType
in interface Function
public TType returnTType()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |