Class SumAggregator
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.SystemAggregator
-
- org.apache.derby.impl.sql.execute.OrderableAggregator
-
- 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
Constructors Constructor Description SumAggregator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
accumulate(DataValueDescriptor addend)
Accumulateint
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
-
-
-
-
Method Detail
-
accumulate
protected void accumulate(DataValueDescriptor addend) throws StandardException
Accumulate- Specified by:
accumulate
in classSystemAggregator
- 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 classOrderableAggregator
-
-