Top Description Fields Constructors Methods
org.apache.derby.impl.sql.execute

public Class SumAggregator

extends OrderableAggregator
Class Inheritance
Known Direct Subclasses
org.apache.derby.impl.sql.execute.AvgAggregator
Imports
org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.types.NumberDataValue, .DataValueDescriptor, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.sql.execute.ExecAggregator, org.apache.derby.iapi.services.io.StoredFormatIds

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

Field Summary

Inherited from org.apache.derby.impl.sql.execute.OrderableAggregator:
value

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
accumulate(DataValueDescriptor
value to be added in
addend
)

Implements abstract org.apache.derby.impl.sql.execute.SystemAggregator.accumulate.

Accumulate

public int

Returns:

the formatID of this class
getTypeFormatId
()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Get the formatID which corresponds to this class.

public ExecAggregator

Returns:

ExecAggregator the new aggregator
newAggregator
()

Implements org.apache.derby.iapi.sql.execute.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.

public String
toString()

Overrides org.apache.derby.impl.sql.execute.OrderableAggregator.toString.

Returns a string representation of the object.

Inherited from org.apache.derby.impl.sql.execute.OrderableAggregator:
getResultmergereadExternalsetupwriteExternal

Constructor Detail

SumAggregatorback to summary
public SumAggregator()

Method Detail

accumulateback to summary
protected void accumulate(DataValueDescriptor addend) throws StandardException

Implements abstract org.apache.derby.impl.sql.execute.SystemAggregator.accumulate.

Accumulate

Parameters
addend:DataValueDescriptor

value to be added in

Exceptions
StandardException:
on error
See Also
ExecAggregator#accumulate
getTypeFormatIdback to summary
public int getTypeFormatId()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Get the formatID which corresponds to this class.

Returns:int

the formatID of this class

newAggregatorback to summary
public ExecAggregator newAggregator()

Implements org.apache.derby.iapi.sql.execute.ExecAggregator.newAggregator.

Doc from org.apache.derby.iapi.sql.execute.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.

Returns:ExecAggregator

ExecAggregator the new aggregator

toStringback to summary
public String toString()

Overrides org.apache.derby.impl.sql.execute.OrderableAggregator.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object