|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An AggregateDefinition defines an aggregate. It is used by Cloudscape during query compilation to determine what Aggregator is used to aggregate a particular data type and what datatype the Aggregator will emit. A single AggregateDefinition may map to one or more Aggregators depending on the input type. For example, a user defined STDEV aggregate may use one aggregator implementation for the INTEGER type and another for a user defined type that implements a point. In this case, both the aggregators would have a single AggregateDefinition that would chose the appropriate aggregator based on the input type. On the other hand, if only a single aggregator is needed to aggregate over all of the input types (e.g. COUNT()), then it may be convenient to implement both the AggregateDefinition and the Aggregator interfaces by the same class.
IBM Corp. reserves the right to change, rename, or remove this interface at any time.
TypeDescriptor
Method Summary | |
TypeDescriptor |
getAggregator(TypeDescriptor inputType,
java.lang.StringBuffer aggregatorClassName)
Get the aggregator that performs the aggregation on the input datatype at execution time. |
Method Detail |
public TypeDescriptor getAggregator(TypeDescriptor inputType, java.lang.StringBuffer aggregatorClassName) throws java.sql.SQLException
The aggregator class must implement a zero argument constructor. The aggregator class can be the same class as the AggregateDefinition if it implements both interfaces.
The result datatype may be the same as the input datatype or a different datatype. To create your own type descriptor to return to this method, see com.ibm.db2j.types.TypeFactory.
inputType
- the input type descriptoraggregatorClassName
- output parameter, filled in
with the class name that implements com.ibm.db2j.aggregates.Aggregator
java.sql.SQLException
- Thrown on error.TypeDescriptor
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |