borland Packages Class Hierarchy dx.dataset Package
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
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:
SumAggOperator
CountAggOperator
MinAggOperator
(a subclass of BoundsAggOperator
)
MaxAggOperator
(a subclass of BoundsAggOperator
)
For examples of applications that use aggregators, see the following projects in the specified directories of your JBuilder installation:
SumAggOperator
, CountAggOperator
, MinAggOperator
, and MaxAggOperator
protected transient Column aggColumnThe
Column
in the DataSet
that is being aggregated on.
protected transient DataSet aggDataSetThe internal
StorageDataSet
that contains and maintains aggregated values.
protected transient Variant aggValuePre-allocated storage for an
aggColumn
value. AggOperator
extension classes use this for storing and manipulating an aggColumn
value.
protected transient StorageDataSet dataSetThe
StorageDataSet
that contains the Column
("aggColumn") that is being aggregated on.
protected transient Column resultColumnThe
Column
in aggDataSet
that contains the aggregated value.
protected transient Variant resultValuePre-allocated storage for a
resultColumn
value. AggOperator
extension classes use this for storing and manipulating a resultColumn
value.
public abstract void add(ReadRow row, long internalRow, boolean first)A row has been added or updated.
row
internalRow
first
public Object clone()Returns a clone (or copy) of this
AggOperator
.
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.
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.
dataSet
StorageDataSet
that contains the aggColumn
that is being aggregated on
groupColumnNames
Column
names to perform grouping by.
aggDataSet
StorageDataSet
that contains and maintains aggregated values.
resultColumn
Column
in aggDataSet
that contains the aggregated value.
aggColumn
Column
in the DataSet
that is being aggregated on.
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
.
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
.
public void open(DataSet aggDataSet)Called when the
aggDataSet
is opened and prepared for usage.