mx.olap

# OLAPSet - AS3 Flex

Package | mx.olap
Class | public class OLAPSet
Inheritance | OLAPSet Object
Implements | IOLAPSet

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The OLAPSet class represents a set, which is used to configure the axis of an OLAP query. A set consists of zero or more tuples; a set that does not contain any tuples is known as an empty set.

Related API Elements

mx.olap.IOLAPSet
mx.olap.OLAPQueryAxis
mx.olap.IOLAPResultAxis
mx.olap.OLAPResultAxis

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
|  | tuples : Array [read-only] The tuples contained by this set instance, as an Array of IOLAPTuple instances. | OLAPSet

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | OLAPSet() Constructor | OLAPSet
|  | addElement(e:IOLAPElement):void Adds a new member to the set. | OLAPSet
|  | addElements(members:IList):void Adds a list of members to the set. | OLAPSet
|  | addTuple(tuple:mx.olap:IOLAPTuple):void Adds a new tuple to the set. | OLAPSet
|  | crossJoin(input:IOLAPSet):IOLAPSet Returns a new IOLAPSet instance that contains a crossjoin of this IOLAPSet instance and input. | OLAPSet
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | hierarchize(post:Boolean = false):IOLAPSet Returns a new IOLAPSet that is hierarchized version of this set. | OLAPSet
|  | 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
|  | union(secondSet:IOLAPSet):IOLAPSet Returns a new IOLAPSet instance that contains a union of this IOLAPSet instance and input. | OLAPSet
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Protected Methods

| Method | Defined By
--- | --- | ---
|  | compareMembers(m1:IOLAPMember, m2:IOLAPMember):int Returns information about the relative location of two members in the set. | OLAPSet
|  | findCommonHierarchy(t1:mx.olap:OLAPTuple, t2:mx.olap:OLAPTuple):IOLAPHierarchy Returns the common IOLAPHierarchy instance for two tuples, or null if the tuples do not share a hierarchy. | OLAPSet
|  | sortTuple(t1:mx.olap:OLAPTuple, t2:mx.olap:OLAPTuple):int Returns information about the relative location of two tuples in the set. | OLAPSet

Property Detail

### tuples

property

`tuples:Array` [read-only]

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

The tuples contained by this set instance, as an Array of IOLAPTuple instances.

Implementation
`public function get tuples():Array`
Constructor Detail

### OLAPSet

()
Constructor

`public function OLAPSet()`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Constructor

Method Detail

### addElement

()
method

`public function addElement(e:IOLAPElement):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Adds a new member to the set.

This method adds the appropriate elements to the set, depending on the type of element passed in. If an IOLAPHierarchy element is passed, it adds the default member of the hierarchy. If an IOLAPLevel element is passed, it adds all the members of the level. If an IOLAPMember element is passed, it is added to the set.

Parameters

| `e:IOLAPElement` — The member to add. If `element` is a hierarchy or level, its members are added. If `element` is an instance of IOLAPMember, it is added directly. A new tuple is created for each member.

### addElements

()
method

`public function addElements(members:IList):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Adds a list of members to the set. This method can be called when members or children of a hierarchy or member need to be added to the set.

Parameters

| `members:IList` — The members to add, as a list of IOLAPMember instances. A new tuple is created for each member.

### addTuple

()
method

`public function addTuple(tuple:mx.olap:IOLAPTuple):void`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Adds a new tuple to the set.

Parameters

| `tuple:mx.olap:IOLAPTuple` — The tuple to add.

### compareMembers

()
method

`protected function compareMembers(m1:IOLAPMember, m2:IOLAPMember):int`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Returns information about the relative location of two members in the set.

Parameters

| `m1:IOLAPMember` — The first member.
| `m2:IOLAPMember` — The second member.

Returns

| `int` — The following:

- 0 if the members are at the same level
- 1 if m2 is higher in the hierarchy than m1
- -1 if m1 is higher in the hierarchy than m2

### crossJoin

()
method

`public function crossJoin(input:IOLAPSet):IOLAPSet`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Returns a new IOLAPSet instance that contains a crossjoin of this IOLAPSet instance and `input`.

Parameters

| `input:IOLAPSet` — An IOLAPSet instance.

Returns

| `IOLAPSet` — An IOLAPSet instance that contains a crossjoin of this IOLAPSet instance and `input`.

### findCommonHierarchy

()
method

`protected function findCommonHierarchy(t1:mx.olap:OLAPTuple, t2:mx.olap:OLAPTuple):IOLAPHierarchy`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Returns the common IOLAPHierarchy instance for two tuples, or null if the tuples do not share a hierarchy.

Parameters

| `t1:mx.olap:OLAPTuple` — The first tuple.
| `t2:mx.olap:OLAPTuple` — The second tuple.

Returns

| `IOLAPHierarchy` — The common IOLAPHierarchy instance for the two tuples, or null if the tuples do not share a hierarchy.

### hierarchize

()
method

`public function hierarchize(post:Boolean = false):IOLAPSet`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Returns a new IOLAPSet that is hierarchized version of this set.

Parameters

| `post:Boolean` (default = `false`)`` — If `true` indicates that children should precede parents. By default, parents precede children.

Returns

| `IOLAPSet` — A new IOLAPSet that is hierarchized version of this set.

### sortTuple

()
method

`protected function sortTuple(t1:mx.olap:OLAPTuple, t2:mx.olap:OLAPTuple):int`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Returns information about the relative location of two tuples in the set.

Parameters

| `t1:mx.olap:OLAPTuple` — The first tuple.
| `t2:mx.olap:OLAPTuple` — The second tuple.

Returns

| `int` — The following:

- 0 if the tuples are at the same level
- 1 if t2 is higher than t1
- -1 if t1 is higher than t2

### union

()
method

`public function union(secondSet:IOLAPSet):IOLAPSet`

Language Version: | ActionScript 3.0

Product Version: | Flex 3

Runtime Versions: | Flash Player 9, AIR 1.1

Returns a new IOLAPSet instance that contains a union of this IOLAPSet instance and `input`.

Parameters

| `secondSet:IOLAPSet` — An IOLAPSet instance.

Returns

| `IOLAPSet` — An IOLAPSet instance that contains a union of this IOLAPSet instance and `input`.

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