All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JBMSTours.aggregates.MaxButOneDef

java.lang.Object
   |
   +----JBMSTours.aggregates.MaxButOneDef

public class MaxButOneDef
extends Object
implements AggregateDefinition
Look at the Source.

Defines the aggregators for an aggregate (MaxButONE). This aggregate returns the runnner up value for the column (not the max, but the value right after that). If the column only contains 0 or 1 rows, it returns a NULL.

You may need to use DISTINCT in conjunction with the aggregate.

As implemented, works only for INTs and DOUBLE PRECISIONs.

We implement Externalizable to save space in case we are written out.


Constructor Index

 o MaxButOneDef()
Niladic constructor

Method Index

 o getAggregator(TypeDescriptor, StringBuffer)

Constructors

 o MaxButOneDef
 public MaxButOneDef()
Niladic constructor

Methods

 o getAggregator
 public TypeDescriptor getAggregator(TypeDescriptor inputType,
                                     StringBuffer aggregatorClassName)
Parameters:
inputType - the input type descriptor
aggregatorClassName - output parameter, filled in with the class name that implements COM.cloudscape.aggregates.Aggregator
Returns:
the output type descriptor (which may or may not be the same as the input type -- it is ok to simply return the input type). Null is returned if the aggregate cannot process the input type.
See Also:
TypeDescriptor

All Packages  Class Hierarchy  This Package  Previous  Next  Index