org.apache.derby.impl.sql.execute
Class SumAggregator

java.lang.Object
  extended by org.apache.derby.impl.sql.execute.SystemAggregator
      extended by org.apache.derby.impl.sql.execute.OrderableAggregator
          extended by org.apache.derby.impl.sql.execute.SumAggregator
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, Formatable, TypedFormat, ExecAggregator
Direct Known Subclasses:
AvgAggregator

public class SumAggregator
extends OrderableAggregator

Aggregator for SUM(). Defers most of its work to OrderableAggregator.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.derby.impl.sql.execute.OrderableAggregator
value
 
Constructor Summary
SumAggregator()
           
 
Method Summary
protected  void accumulate(DataValueDescriptor addend)
          Accumulate
 int getTypeFormatId()
          Get the formatID which corresponds to this class.
 ExecAggregator newAggregator()
          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.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.derby.impl.sql.execute.OrderableAggregator
getResult, merge, readExternal, setup, writeExternal
 
Methods inherited from class org.apache.derby.impl.sql.execute.SystemAggregator
accumulate, didEliminateNulls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SumAggregator

public SumAggregator()
Method Detail

accumulate

protected void accumulate(DataValueDescriptor addend)
                   throws StandardException
Accumulate

Specified by:
accumulate in class SystemAggregator
Parameters:
addend - value to be added in
Throws:
StandardException - on error
See Also:
ExecAggregator.accumulate(org.apache.derby.iapi.types.DataValueDescriptor, java.lang.Object)

newAggregator

public ExecAggregator newAggregator()
Description copied from interface: ExecAggregator
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.

Returns:
ExecAggregator the new aggregator

getTypeFormatId

public int getTypeFormatId()
Get the formatID which corresponds to this class.

Returns:
the formatID of this class

toString

public java.lang.String toString()
Overrides:
toString in class OrderableAggregator

Built on Thu 2011-03-10 11:54:14+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.