CubeCollectionDefn Class Methods
The following section discusses the CubeCollectionDefn class methods. The methods are discussed in alphabetical order.
Syntax
AttachCube(CubeName)
Description
Use the AttachCube method to attach the existing cube specified by CubeName to the cube collection.
You should only specify cube collections comprised of derived/work records as the main record for a presentation cube collection.
Parameters
Field or Control |
Definition |
---|---|
CubeName |
Specify the name of the cube you want to attach. |
Returns
None.
Syntax
DetachCube(CubeName)
Description
Use the DetachCube to detach the cube specified by CubeName from the cube collection.
Parameters
Field or Control |
Definition |
---|---|
CubeName |
Specify the name of the cube that you want to detach. |
Returns
None.
Syntax
GetAggregateMapping(PartName, IsCube)
Description
Use the GetAggregateMapping method to return the aggregate mapping field specified by the part PartName.
Parameters
Field or Control |
Definition |
---|---|
PartName |
Specify the part name for which you want the aggregate mapping field name. |
IsCube |
Specify whether the part is a cube or not. This parameter takes a Boolean value, true if the part is a cube, false otherwise. |
Returns
A string.
Syntax
GetCubeNames()
Description
Use the GetCubeNames method to return an array of strings containing all the names of the cubes associated with this cube collection.
Parameters
None.
Returns
An array of string.
Syntax
GetDimensionNames()
Description
Use the GetDimensionNames method to return an array of string containing the names of all the dimensions associated with the cube collection.
The dimension names are returned in an array of string.
Parameters
None.
Returns
An array of string.
Syntax
GetDimSort(DimensionName)
Description
Use the GetDimSort method return the sorting keys used for the dimension.
The sorting keys are returned as an array of any.
The first string is either true or false. If the first string is true it indicates that the dimension is sorted by the names of the members in the dimension.
The second string then is either true or false, indicating whether the sort is ascending (or descending). If the first string is false it indicates that the dimension is sorted by keys, which are the specified by the other strings in the array. The keys are names of cubes. The strings are as follows:
Ascend1
CubeName1
Ascend2
CubeName2
Ascend3
CubeName3
Parameters
Field or Control |
Definition |
---|---|
DimensionName |
Specify the name of the dimension for which you want the sorting keys. |
Returns
An array of any.
Syntax
GetFieldMapping(PartName, IsCube)
Description
Use the GetFieldMapping method to return the name of the mapped field name for the part specified by PartName.
Parameters
Field or Control |
Definition |
---|---|
PartName |
Specify the name of the part for which you want the mapped field name. |
IsCube |
Specify whether this part is a cube or not. This parameter takes a Boolean value: true if the part is a cube, false otherwise. |
Returns
A string.
Syntax
GetFilter(DimensionName)
Description
Use the GetFilter method to return the name of the user function used as a filter for the dimension specified by DimensionName.
Parameters
Field or Control |
Definition |
---|---|
DimensionName |
Specify the name of the dimension for which you want the filter name. |
Returns
A string.
Syntax
GetPersistAggregate(DimensionName)
Description
Use the GetPersistAggregate method to return the value for the persist aggregate for the dimension specified by DimensionName.
Parameters
Field or Control |
Definition |
---|---|
DimensionName |
Specify the name of the dimension for which you want to find the persist aggregate value. |
Returns
An integer, which is one of the following values:
Value |
Description |
---|---|
AnalyticModel_AggrType_Root |
The persist aggregate type is Root, that is, only the root node's data is saved to the database. |
AnalyticModel_AggrType_All |
The persist aggregate type is All, that is, save all of the dimension's aggregate data to the database. |
AnalyticModel_AggrType_ None |
The persist aggregate type is None, that is, do not save any of the dimension's aggregate data to the database. |
Syntax
SetAggregateMapping(PartName, IsCube, AggregateFieldName)
Description
Use the SetAggregateMapping method to specify an aggregate field for the part specified by PartName.
You can map a field to only one data cube or dimension within one cube collection.
Parameters
Field or Control |
Definition |
---|---|
PartName |
Specify the name of the part for which you want to add an aggregate field. |
IsCube |
Specify whether the part is a cube. This parameter takes a Boolean value, true if the part is a cube, false otherwise. |
AggregateFieldName |
Specify the name of the field to be used to hold the aggregate value. |
Returns
A string containing the name of the field that contains the aggregate value.
Syntax
SetDimSort(DimName, IsAscending [, CubeName1, IsAscending2, CubeName2, IsAscending3, CubeName3])
Description
Use the SetDimSort method to specify the sorting order for the dimension.
If CubeName1 is an empty string, the dimension is sorted by the names of the members of the dimension, and the other parameters are not used.
If CubeName1 is not an empty string, the dimension is sorted by cubes, as specified by the other parameters.
The Boolean parameter IsAscending defines whether sorting should be in ascending or descending order. Up to three sort keys may be specified. CubeName1 is the primary sort key. CubeName2 is used to sub-sort any members that have the same key value under CubeName1, and so on.
Parameters
Field or Control |
Definition |
---|---|
DimensionName |
Specify the name of the dimension that you would like to specify a sort order for. |
IsAscending |
Specify if the dimension should be sorted in ascending or descending order. This parameter takes a Boolean value: true if the sort should be ascending, false if it should be descending. |
CubeName1 |
Specify whether the dimension is to be sorted by members or by cubes. If the dimension is to be sorted by members, specify a null string for this parameter. If the dimension is to be sorted by cubes, specify a cube name. |
IsAscending2 |
Specify if the sort for CubeName1 is in ascending or descending order. This parameter takes a Boolean value: true if the sort is ascending, false if its descending. |
CubeName2 |
Specify the name of a cube to be used to sub-sort the primary sort specified by CubeName1. |
IsAscending3 |
Specify if the sort for CubeName2 is in ascending or descending order. This parameter takes a Boolean value: true if the sort is ascending, false if its descending. |
CubeName3 |
Specify the name of a cube to be used to sub-sort the primary sort specified by CubeName2. |
Returns
None.
Syntax
SetFieldMapping(PartName, FieldName, IsCube)
Description
Use the SetFieldMapping method to specify the name of the main field used for mapping the part specified by PartName.
You can map a field to only one data cube or dimension within one cube collection.
Parameters
Field or Control |
Definition |
---|---|
PartName |
Specify the name of the part for which you want to assign a mapping field. |
FieldName |
Specify the name of the field to be used for the field mapping. |
IsCube |
Specify whether or not the part is a cube. This parameter takes a Boolean value: true if the part is a cube, false otherwise. |
Returns
None.
Syntax
SetFilter(DimensionName, UserFunctionName)
Description
Use the SetFilter method to specify the user function to be used as a filter for the dimension specified by DimensionName.
Parameters
Field or Control |
Definition |
---|---|
DimensionName |
Specify the name of the dimension for which you want to set a filter. |
UserFunctionName |
Specify the name of a user function to be used as a filter for this dimension. |
Returns
None.
Syntax
SetPersistAggregate(DimensionName, AggregateType)
Description
Use the SetPersistAggregate to specify the value for the persist aggregate for the dimension specified by DimensionName.
Parameters
Field or Control |
Definition |
---|---|
DimensionName |
Specify the name of the dimension for which you want to set the persist aggregate. |
AggregateType |
Specify the aggregate type. Values are: |
Value |
Description |
---|---|
AnalyticModel_AggrType_Root |
The persist aggregate type is Root, that is, only the root node's data is saved to the database. |
AnalyticModel_AggrType_All |
The persist aggregate type is All, that is, save all of the dimension's aggregate data to the database. |
AnalyticModel_AggrType_ None |
The persist aggregate type is None, that is, do not save any of the dimension's aggregate data to the database. |
Returns
None.
Syntax
UsesCube(CubeName)
Description
Use the UsesCube method to determine if the cube collection uses the cube specified by CubeName.
Parameters
Field or Control |
Definition |
---|---|
CubeName |
Specify the name of the cube that you want to verify. |
Returns
A Boolean value, true if the specified cube is part of the cube collection, false otherwise.
Syntax
UsesDimension(DimensionName)
Description
Use the UsesDimension method to determine if the cube collection uses the dimension specified by DimensionName.
Parameters
Field or Control |
Definition |
---|---|
DimensionName |
Specify the name of the dimension that you want to verify. |
Returns
A Boolean value: true if the dimension is part of the cube collection, false otherwise.