mx.olap.aggregators

# CountAggregator - AS3 Flex

Package | mx.olap.aggregators
Class | public class CountAggregator
Inheritance | CountAggregator Object
Implements | IOLAPCustomAggregator

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The CountAggregator class implements the count aggregator. The count aggregator returns the count of the measures. Flex uses this aggregator when you set the `OLAPMeasure.aggregator` property to `"COUNT"`.

Related API Elements

mx.olap.OLAPMeasure

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | computeBegin(dataField:String):Object Flex calls this method to start the computation of an aggregation value. | CountAggregator
|  | computeEnd(data:Object, dataField:String):Number Flex calls this method to end the computation of the aggregation value. | CountAggregator
|  | computeLoop(data:Object, dataField:String, value:Object):void Flex calls this method when a new value needs to be added to the aggregation. | CountAggregator
|  | computeObjectBegin(value:Object):Object Flex calls this method to start aggregation of aggregated values. | CountAggregator
|  | computeObjectEnd(oldValue:Object, dataField:String):Number Flex calls this method to end the computation. | CountAggregator
|  | computeObjectLoop(oldValue:Object, newValue:Object):void Flex calls this method when a new aggregated value needs to be added to the aggregation. | CountAggregator
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Method Detail

### computeBegin

()
method

`public function computeBegin(dataField:String):Object`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Flex calls this method to start the computation of an aggregation value.

Parameters

| `dataField:String` — The name of the `OLAPMeasure.dataField` property for the measure to be aggregated.

Returns

| `Object` — An Object initialized for the aggregation. Use this Object to hold any information necessary to perform the aggregation. You pass this Object to subsequent calls to the `computeLoop()` and `computeEnd()` methods.

### computeEnd

()
method

`public function computeEnd(data:Object, dataField:String):Number`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Flex calls this method to end the computation of the aggregation value.

Parameters

| `data:Object` — The Object returned by the call to the `computeLoop()` method. Use this Object to hold information necessary to perform the aggregation.
| `dataField:String` — The name of the `OLAPMeasure.dataField` property for the measure to be aggregated.

Returns

| `Number` — The aggregated value.

### computeLoop

()
method

`public function computeLoop(data:Object, dataField:String, value:Object):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Flex calls this method when a new value needs to be added to the aggregation.

Parameters

| `data:Object` — The Object returned by the call to the `computeBegin()` method, or calculated by a previous call to the `computeLoop()` method. Use this Object to hold information necessary to perform the aggregation. This method modifies this Object; it does not return a value.
| `dataField:String` — The name of the `OLAPMeasure.dataField` property for the measure to be aggregated.
| `value:Object` — The object representing the rows data that is being analyzed.

### computeObjectBegin

()
method

`public function computeObjectBegin(value:Object):Object`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Flex calls this method to start aggregation of aggregated values. Calculating the average value of a group of averages is an example of an aggregation of aggregated values.

Parameters

| `value:Object` — The Object returned by the call to the `computeEnd()` method for a previous aggregation. Use this Object to hold the information necessary to perform the aggregation.

Returns

| `Object` — An Object initialized for the aggregation. Use this Object to hold any information necessary to perform the aggregation. You pass this Object to subsequent calls to the `computeObjectLoop()` and `computeObjectEnd()` methods.

### computeObjectEnd

()
method

`public function computeObjectEnd(oldValue:Object, dataField:String):Number`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Flex calls this method to end the computation.

Parameters

| `oldValue:Object` — The Object returned by a call to the `computeObjectLoop()` method that is used to store the aggregation results. This method modifies this Object; it does not return a value.
| `dataField:String` — The name of the `OLAPMeasure.dataField` property for the measure to be aggregated.

Returns

| `Number` — The aggregated value.

### computeObjectLoop

()
method

`public function computeObjectLoop(oldValue:Object, newValue:Object):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Flex calls this method when a new aggregated value needs to be added to the aggregation.

Parameters

| `oldValue:Object` — The Object returned by a call the `computeObjectBegin()` method, or calculated by a previous call to the `computeObjectLoop()` method. This method modifies this Object; it does not return a value.
| `newValue:Object` — The Object returned by the call to the `computeEnd()` method for a previous aggregation.

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00