|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.teiid.query.function.aggregate.AggregateFunction
public abstract class AggregateFunction
This represents the interface for an aggregate function. The basic lifecycle is that the AggregateFunction is initialize()'d with the type of the element being aggregated, then addInput() is called for every row in the group, then getResult() is called to retrieve the result.
Constructor Summary | |
---|---|
AggregateFunction()
|
Method Summary | |
---|---|
void |
addInput(java.util.List<?> tuple)
|
abstract void |
addInputDirect(java.lang.Object input,
java.util.List<?> tuple)
Called for the element value in every row of a group. |
abstract java.lang.Object |
getResult()
Called after all values have been processed to get the result. |
void |
initialize(java.lang.Class<?> dataType,
java.lang.Class<?> inputType)
Called to initialize the function. |
abstract void |
reset()
Called to reset the state of the function. |
void |
setExpressionIndex(int expressionIndex)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AggregateFunction()
Method Detail |
---|
public void setExpressionIndex(int expressionIndex)
public void initialize(java.lang.Class<?> dataType, java.lang.Class<?> inputType)
dataType
- Data type of element begin aggregatedinputType
- public abstract void reset()
public void addInput(java.util.List<?> tuple) throws TeiidComponentException, TeiidProcessingException
TeiidComponentException
TeiidProcessingException
public abstract void addInputDirect(java.lang.Object input, java.util.List<?> tuple) throws TeiidComponentException, TeiidProcessingException
input
- Input value, may be nulltuple
-
TeiidProcessingException
TeiidComponentException
public abstract java.lang.Object getResult() throws FunctionExecutionException, ExpressionEvaluationException, TeiidComponentException, TeiidProcessingException
TeiidProcessingException
FunctionExecutionException
ExpressionEvaluationException
TeiidComponentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |