borland Packages  Class Hierarchy  dx.dataset Package 

AggOperator class (abstract)

java.lang.Object
   +----com.borland.dx.dataset.AggOperator
           +----com.borland.dx.dataset.BoundsAggOperator
           +----com.borland.dx.dataset.CountAggOperator
           +----com.borland.dx.dataset.CustomAggOperator
           +----com.borland.dx.dataset.SumAggOperator

About the AggOperator class

Variables  Properties  Methods  

Implements Serializable, Cloneable

The AggOperator class is an abstract class that defines basic aggregator behavior of a calculated value or a calculated Column. All aggregation operators must extend from this class, therefore, you should extend this class when creating custom AggOperator classes. The following aggregator operators are provided and can be specified as the aggOperator of the AggDescriptor object:


AggOperator variables

Variables implemented in this class

AggOperator properties

*Read-only properties **Write-only properties

Properties implemented in java.lang.Object

AggOperator methods

Methods implemented in this class

Methods implemented in java.lang.Object


AggOperator variables

aggColumn

  protected transient Column aggColumn
The Column in the DataSet that is being aggregated on.

aggDataSet

  protected transient DataSet aggDataSet
The internal StorageDataSet that contains and maintains aggregated values.

aggValue

  protected transient Variant aggValue
Pre-allocated storage for an aggColumn value. AggOperator extension classes use this for storing and manipulating an aggColumn value.

dataSet

  protected transient StorageDataSet dataSet
The StorageDataSet that contains the Column ("aggColumn") that is being aggregated on.

resultColumn

  protected transient Column resultColumn
The Column in aggDataSet that contains the aggregated value.

resultValue

  protected transient Variant resultValue
Pre-allocated storage for a resultColumn value. AggOperator extension classes use this for storing and manipulating a resultColumn value.

AggOperator methods

add(com.borland.dx.dataset.ReadRow, long, boolean)

  public abstract void add(ReadRow row, long internalRow, boolean first)
A row has been added or updated.

Parameters:

row
The row containing the values.
internalRow
The unique identifier for the row.
first
Returns true if this is the first row in the group, false otherwise.

clone()

  public Object clone()
Returns a clone (or copy) of this AggOperator.

Overrides: java.lang.Object.clone()

delete(com.borland.dx.dataset.ReadRow, long)

  public abstract void delete(ReadRow row, long internalRow)
A row has been deleted or updated. The row parameter contains the row's values and internalRow is a unique identifier for that row.

init(com.borland.dx.dataset.StorageDataSet, java.lang.String[], com.borland.dx.dataset.StorageDataSet, com.borland.dx.dataset.Column, com.borland.dx.dataset.Column)

  public void init(StorageDataSet dataSet, String[]groupColumnNames, StorageDataSet aggDataSet, Column resultColumn, Column aggColumn)
Called when the AggOperator is being initialized. If overridden by an extended class, super.init() should still be called to ensure proper initialization. Note that this method is called before the aggDataSet is opened. This allows an AggOperator extension to add a column to the aggDataSet. This can be useful for some types of maintained aggregations like average that would need to accumulate count and total.

Parameters:

dataSet
The StorageDataSet that contains the aggColumn that is being aggregated on
groupColumnNames
A array of the Column names to perform grouping by.
aggDataSet
The internal StorageDataSet that contains and maintains aggregated values.
resultColumn
The Column in aggDataSet that contains the aggregated value.
aggColumn
The Column in the DataSet that is being aggregated on.

locate(com.borland.dx.dataset.ReadRow)

  public boolean locate(ReadRow row)
Implemented by subclasses MinAggOperator and MaxAggOperator to locate the minimum or maximum value for the grouping column values specified in row.

needsAggDataSet()

  public boolean needsAggDataSet()
This method returns true and specifies whether the AggOperator subclass requires an aggDataSet (an internal StorageDataSet that contains and maintains aggregated values). The MinAggOperator and MaxAggOperator classes internally override this setting since they use a secondary index to track minimum and maximum values rather than an aggDataSet.

open(com.borland.dx.dataset.DataSet)

  public void open(DataSet aggDataSet)
Called when the aggDataSet is opened and prepared for usage.