OrderableAggregator
| Modifier and Type | Field and Description |
|---|---|
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | accumulate(DataValueDescriptor
value to be added in addend)Implements abstract org. Accumulate |
| public int | Returns: the formatID of this classImplements org. Get the formatID which corresponds to this class. |
| public ExecAggregator | Returns: ExecAggregator the new aggregatorImplements org. Return a new initialized copy of this aggregator, any state set by the setup() method of the original Aggregator must be copied into the new aggregator. |
| public void | readExternal(ObjectInput
the stream to read data from in order to restore the object in)Overrides org. Implements java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
| public void | setup(ClassFactory
Database-specific class factory. cf, String For builtin aggregates, this is a SQL aggregate name like MAX. For user-defined aggregates, this is the name of the user-written class which implements org.apache.derby.agg.Aggregator. aggregateName, DataTypeDescriptor The type returned by the getResult() method. returnType)Overrides org. Implements org. Set's up the aggregate for processing. |
| public void | writeExternal(ObjectOutput
the stream to write the object to out)Overrides org. Implements java. Although we are not expected to be persistent per se, we may be written out by the sorter temporarily. |
| isMax | back to summary |
|---|---|
| private boolean isMax | |
| MaxMinAggregator | back to summary |
|---|---|
| public MaxMinAggregator() | |
| accumulate | back to summary |
|---|---|
| protected void accumulate(DataValueDescriptor addend) throws StandardException Implements abstract org. Accumulate
| |
| getTypeFormatId | back to summary |
|---|---|
| public int getTypeFormatId() Implements org. Get the formatID which corresponds to this class.
| |
| newAggregator | back to summary |
|---|---|
| public ExecAggregator newAggregator() Implements org. Doc from org. Return a new initialized copy of this aggregator, any state set by the setup() method of the original Aggregator must be copied into the new aggregator.
| |
| readExternal | back to summary |
|---|---|
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException Overrides org. Implements java. Doc from java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.
| |
| setup | back to summary |
|---|---|
| public void setup(ClassFactory cf, String aggregateName, DataTypeDescriptor returnType) Overrides org. Implements org. Doc from org. Set's up the aggregate for processing.
| |
| writeExternal | back to summary |
|---|---|
| public void writeExternal(ObjectOutput out) throws IOException Overrides org. Implements java. Doc from org. Although we are not expected to be persistent per se, we may be written out by the sorter temporarily. So we need to be able to write ourselves out and read ourselves back in. We rely on formatable to handle situations where value is null. Why would we be called to write ourselves out if we are null? For scalar aggregates, we don't bother setting up the aggregator since we only need a single row. So for a scalar aggregate that needs to go to disk, the aggregator might be null.
| |