Related Classes
The following object types are necessary to most Dynamic Cube Services implementations.
NOTE: In the descriptions below, basic methods and properties (for example, ToString) have been omitted.
NOTE: Implementations typically require knowledge of other classes and BRApi functions, typically found in Finance Business Rule (Member, DataCell, etc) and Connector Business Rules (DbConnInfo, etc).
DataBufferCellPk Class
The DataBufferCellPk class is responsible for managing primary keys for data buffer cells, i.e. the combination of dimension members that points to an individual value. This is the same class typically found in advanced Finance Business Rules related to calculations.
Properties
AccountId: int |
Gets or sets the account ID. |
FlowId: int |
Gets or sets the flow ID. |
OriginId: int |
Gets or sets the origin ID. |
ICId: int |
Gets or sets the intercompany ID. |
UD1Id: int |
Gets or sets the user-defined dimension 1 ID. |
UD2Id: int |
Gets or sets the user-defined dimension 2 ID. |
UD3Id: int |
Gets or sets the user-defined dimension 3 ID. |
UD4Id: int |
Gets or sets the user-defined dimension 4 ID. |
UD5Id: int |
Gets or sets the user-defined dimension 5 ID. |
UD6Id: int |
Gets or sets the user-defined dimension 6 ID. |
UD7Id: int |
Gets or sets the user-defined dimension 7 ID. |
UD8Id: int |
Gets or sets the user-defined dimension 8 ID. |
Constructors
DataBufferCellPk()
|
Initializes a new instance of the DataBufferCellPk class. |
DataBufferCellPk(DataBufferCellPk from)
|
Initializes a new instance of the DataBufferCellPk class by copying an existing instance. |
DataBufferCellPk(DataCellPk dataCellPk)
|
Initializes a new instance of the DataBufferCellPk class by copying an existing DataCellPk instance. |
DataBufferCellPk(DataRecordPk dataRecordPk)
|
Initializes a new instance of the DataBufferCellPk class by copying an existing DataRecordPk instance. |
DataBufferCellPk(int initialMemberIdForAllDims)
|
Initializes a new instance of the DataBufferCellPk class with the same initial member ID for all dimensions. |
DataBufferCellPk(int accountId, int flowId, int originId, int icId, int ud1Id, int ud2Id, int ud3Id, int ud4Id, int ud5Id, int ud6Id, int ud7Id, int ud8Id)
|
Initializes a new instance of the DataBufferCellPk class with specified IDs for all dimensions. |
Methods
CreateUnknown(): static DataBufferCellPk |
Creates an instance of DataBufferCellPk with unknown values. |
AreAllMembersSetToAll(): bool |
Checks if all members are set to "all". |
DataCacheCell Class
The DataCacheCell
class represents a DataCell kept in memory.
Properties
CellAmount: decimal
|
Gets or sets the cell amount. |
CellStatus: DataCellStatus
|
Gets or sets the cell status. |
Constructors
DataCacheCell()
|
Initializes a new instance of the DataCacheCell class.
|
DataCacheCell(DataCacheCell from)
|
Initializes a new instance of the DataCacheCell class by copying an existing instance.
|
DataCacheCell(DataCacheCell from, decimal aggWeight)
|
Initializes a new instance of the DataCacheCell class by copying an existing instance and applying an aggregation weight.
|
DataCacheCell(DataCellStorageType dataCellStorageType)
|
Initializes a new instance of the DataCacheCell class with the specified data cell storage type.
|
DataCacheCell(DataCellExistenceType dataCellExistenceType, DataCellStorageType dataCellStorageType)
|
Initializes a new instance of the DataCacheCell class with the specified data cell existence type and storage type.
|
DataCacheCell(decimal cellAmount, DataCellStatus cellStatus)
|
Initializes a new instance of the DataCacheCell class with the specified cell amount and cell status.
|
Methods
SetData(decimal cellAmount, DataCellExistenceType dataCellExistenceType, DataCellStorageType dataCellStorageType)
|
Sets the data for the cell in memory.
|
Aggregate(DataCacheCell sourceDataCacheCell, decimal aggWeight, bool changeDerivedDataToRealData)
|
Aggregates the data from the source data cache cell with the specified aggregation weight and changes data type from Derived to Real if specified.
|
AggregateDataCacheCells(DataCacheCell[] sourceDataCells, DataCacheCell[] resultDataCells): static
|
Aggregates data cache cells from the source array to the rest array. |
ClearDataCacheCells(DataCacheCell[] dataCells, int lastPeriodIndexToClear): static bool
|
Clears the data cache cells up to the specified last period index. |
AreDataCacheCellsEqual(DataCacheCell[] dataCells1, DataCacheCell[] dataCells2): static bool
|
Checks if two arrays of data cache cells are equal. |
DataRecord Class
DataRecord
objects represent a record in the DataUnit. Each record points to a specific combination of members for all dimensions, and contains all values of that intersection in a single year.
Properties
DataRecordPk: DataRecordPk
|
Gets or sets the data record primary key, which holds references to the dimension members defining the intersection.
|
DataCells: DataCacheCell[]
|
Gets or sets the data cells. Note that cells can also be accessed directly from the object, e.g. Dim myCell as DataCacheCell = myDataRecordObject(0).
|
Constructors
DataRecord()
|
Initializes a new instance of the DataRecord class.
|
DataRecord(int numDataCells)
|
Initializes a new instance of the DataRecord class with the specified number of data cells, which should typically be the same as the amount of periods required in a DataUnit. For example, 12 for a monthly application.
|
DataRecord(DataRecordPk dataRecordPk, int numDataCells)
|
Initializes a new instance of the DataRecord class with the specified data record primary key and number of data cells, which should typically be the same as the amount of periods required in a DataUnit. For example, 12 for a monthly application..
|
DataRecord(DataRecordPk dataRecordPk, DataCacheCell[] dataCells)
|
Initializes a new instance of the DataRecord class with the specified data record primary key and data cells.
|
DataRecord(DataRecord from)
|
Initializes a new instance of the DataRecord class by copying an existing instance.
|
Methods
Aggregate(DataRecord sourceDataRecord, decimal aggWeight)
|
Aggregates the data from the source data record with the specified aggregation weight. |
Aggregate(DataRecord sourceDataRecord, decimal aggWeight, bool changeDerivedDataToRealData, int lastPeriodIndexToAggregate)
|
Aggregates the data from the source data record with the specified aggregation weight, changes derived data to real data if specified, and aggregates up to the specified last period index. |
HasNonZeroCells(): bool
|
Checks if the data record has non-zero cells. |
GetDataCellArrayLengthInYearForFrequency(SessionInfo si, TimeDimAppInfoEx timeDimAppInfo, int year, Frequency frequency): static int
|
Gets the length of the data cell array for a given year and frequency. |
ResizeDataCellArrayIfNecessary(TimeDimType timeDimType, int newNumDataCells): bool
|
Resizes the data cell array if necessary. |
ConvertToAnotherFrequency(SessionInfo si, DataRecord sourceDataRecord, TimeDimAppInfoEx timeDimAppInfo, int sourceFreqId, int destFreqId, ref bool foundDestCellsThatAreDerivedOrRealData): static DataRecord
|
Converts the data record to another frequency. |
ConvertDerivedDataCellToRealDataIfNecessary(DataCacheCell[] sourceDataCells, int indexOfSourceCellUsedToCreatePreviousDestCell, int indexOfSourceCellUsedToCreateThisDestCell, DataCacheCell destDataCell, ref bool foundDestCellsThatAreDerivedOrRealData): static
|
Converts derived data cells to real data if necessary. |
CreateNoDataDataRecord(DataRecordPk dataRecordPk, int numDataCells): static DataRecord
|
Creates a data record with no data. |
DataRecordPk Class
The DataRecordPk
class is responsible for managing primary keys for data records, which means holding references to the dimension members defining the intersections that the record will contain.
Properties
CubeId: int
|
Gets or sets the cube ID. |
EntityId: int
|
Gets or sets the entity ID. |
ParentId: int
|
Gets or sets the parent entity ID.
|
ConsId: int
|
Gets or sets the consolidation ID. |
ScenarioId: int
|
Gets or sets the scenario ID. |
YearId: int
|
Gets or sets the year ID. |
AccountId: int
|
Gets or sets the account ID. |
FlowId: int
|
Gets or sets the flow ID. |
OriginId: int
|
Gets or sets the origin ID. |
ICId: int
|
Gets or sets the intercompany ID. |
UD1Id: int
|
Gets or sets the user-defined dimension 1 ID. |
UD2Id: int
|
Gets or sets the user-defined dimension 2 ID. |
UD3Id: int
|
Gets or sets the user-defined dimension 3 ID. |
UD4Id: int
|
Gets or sets the user-defined dimension 4 ID. |
UD5Id: int
|
Gets or sets the user-defined dimension 5 ID. |
UD6Id: int
|
Gets or sets the user-defined dimension 6 ID. |
UD7Id: int
|
Gets or sets the user-defined dimension 7 ID. |
UD8Id: int
|
Gets or sets the user-defined dimension 8 ID. |
this[int dimTypeId]: int
|
Returns the ID of the member for the dimension specified. Example: Dim myUd8MemberID as Integer = myDataRecordPK(DimType.UD8.Id)
|
Constructors
DataRecordPk()
|
Initializes a new instance of the DataRecordPk class.
|
DataRecordPk(DataRecordPk from)
|
Initializes a new instance of the DataRecordPk class by copying an existing instance.
|
DataRecordPk(int cubeId, int entityId, int parentId, int consId, int scenarioId, int yearId, int accountId, int flowId, int originId, int icId, int ud1Id, int ud2Id, int ud3Id, int ud4Id, int ud5Id, int ud6Id, int ud7Id, int ud8Id)
|
Initializes a new instance of the DataRecordPk class with specified IDs for all dimensions.
|
DataRecordPk(int cubeId, int entityId, int parentId, int consId, int scenarioId, int yearId, DataBufferCellPk dataBufferCellPk)
|
Initializes a new instance of the DataRecordPk class with specified IDs for DataUnit dimensions, retrieving IDs for the other dimensions from a provided DataBufferCellPk instance.
|
DataRecordPk(DataCellPk dataCellPk, int yearId)
|
Initializes a new instance of the DataRecordPk class for the provided year, retrieving member IDs from the provided DataCellPk instance.
|
DataRecordPk(DataUnitCachePk dataUnitCachePk, DataBufferCellPk dataBufferCellPk)
|
Initializes a new instance of the DataRecordPk class retrieving member IDs from the provided DataUnitCachePk and DataBufferCellPk instances.
|
DynamicDataUnitData
The DynamicDataUnitData
class represents a DataUnit, which contains all records pointing to a specific Scenario/Entity/Year combination.
Properties
ContentTimestamp: DateTime
|
Gets or sets the content timestamp. See the section on ReadDynamicDataUnitContentTimestamp for more information.
|
NumSecondsBeforeReadingContentTimestamp: int
|
The number of seconds before the content timestamp will be re-checked.
|
NumTimePeriodsPerDataRecord: int
|
Gets the number of time periods per data record. This depends on the application configuration; for example, a monthly application will require 12 periods per record.
|
Constructors
DynamicDataUnitData(FinanceRulesApi api)
|
Initializes a new instance of the DynamicDataUnitData class using the specified FinanceRulesApi instance.
|
DynamicDataUnitData(FinanceRulesApi api, DateTime contentTimestamp, int numSecondsBeforeReadingContentTimestamp)
|
Initializes a new instance of the DynamicDataUnitData class with the specified FinanceRulesApi instance, content timestamp, and number of seconds before checking the content timestamp.
|
Methods
GetDataRecordCollection(): DataRecordCollection
|
Returns the collection of DataRecord. This is a special List-like class with utility methods, see the relevant section for details.
|
GetDataCellAnnotations(): DynamicDataUnitAnnotationCollection
|
Returns a collection of data cell annotations. This is a special List-like class with utility methods, see the relevant section for details.
|
SetDataRecords(SessionInfo si, IEnumerable dataRecords)
|
Assign to the DataUnit all records contained in the provided IEnumerable. For example, a List or Array..
|
SetDataRecord(SessionInfo si, DataRecord dataRecord)
|
Add a single data record to the DataUnit.
|
SetDataCell(SessionInfo si, int timeId, DataBufferCellPk dataBufferCellPk, decimal cellYTDAmount, DataCellExistenceType dataCellExistenceType, DataCellStorageType dataCellStorageType)
|
Set a single data cell into the DataUnit. Note that it's typically preferable to work with DataRecords for better performance.
|
SetDataCellUsingCellIndex(SessionInfo si, int zeroBasedCellIndex, DataBufferCellPk dataBufferCellPk, decimal cellYTDAmount, DataCellExistenceType dataCellExistenceType, DataCellStorageType dataCellStorageType)
|
Sets a data cell using the cell index, where an index of 0 is the first period in the year, 1 is the second period, etc. Note that it's typically preferable to work with DataRecords for better performance.
|
SetDataCellAnnotation(SessionInfo si, int timeId, int viewId, DataBufferCellPk dataBufferCellPk, string textValue)
|
Sets a data cell annotation. |
SetDataCellAnnotationUsingCellIndex(SessionInfo si, int zeroBasedCellIndex, int viewId, DataBufferCellPk dataBufferCellPk, string textValue)
|
Sets a data cell annotation using the cell index, where an index of 0 is the first period in the year, 1 is the second period, etc.
|
DynamicDimensionInfo
The DynamicDimensionInfo
class represents a generated dimension.
Properties
ContentTimestamp: DateTime
|
Gets or sets the content timestamp. |
NumSecondsBeforeReadingContentTimestamp: int
|
Gets the number of seconds before reading the content timestamp. |
Members: DynamicMemberCollection
|
Gets the collection of dynamic members. |
Relationships: DynamicRelationshipCollection
|
Gets the collection of dynamic relationships. |
Constructors
-
DynamicDimensionInfo(DateTime contentTimestamp, int numSecondsBeforeReadingContentTimestamp, DynamicMemberCollection members, DynamicRelationshipCollection relationships)
Initializes a new instance of the DynamicDimensionInfo
class with the specified content timestamp, number of seconds before reading the content timestamp, dynamic members, and dynamic relationships.
DynamicMember
The DynamicMember
class represents a single member of a Dynamic Dimension. It is effectively a wrapper around a regular Member object. In most cases, developers should obtain DynamicMember instances from the utility methods of a DynamicMemberCollection object.
IMPORTANT: if creating a Member instance from scratch, you should generate a unique ID with the GetOrCreateMemberId method from a DynamicMemberCollection object.
Properties
Member: Member
|
Gets or sets the Member object.
|
VaryingMemberProperties: VaryingMemberProperties
|
Gets or sets the varying member properties. |
MemberDescriptions: Dictionary<string, MemberDescription>
|
Gets or sets language-specific member descriptions.
|
Constructors
DynamicMember()
|
Initializes a new instance of the DynamicMember class.
|
DynamicMember(Member member, VaryingMemberProperties varyingMemberProperties, Dictionary<string, MemberDescription> memberDescriptions)
|
Initializes a new instance of the DynamicMember class with the specified member, varying member properties, and member descriptions.
|
DynamicMember(int dimTypeId, int memberId, string name, string description, int dimId)
|
Initializes a new instance of the DynamicMember class with the specified dimension type ID, member ID, name, description, and dimension ID.
|
DynamicMemberCollection
The DynamicMemberCollection
class contains all members that will be available in a dynamic dimension. Optionally, it will maintain a set of mappings between members and their related information in an external system. The class also contains a number of utility methods to create Dynamic Members that can be added to the collection.
Properties
Count: int
|
Gets the number of members in the collection. |
Constructors
DynamicMemberCollection()
|
Initializes a new instance of the DynamicMemberCollection class.
|
Methods
Add(SessionInfo si, DynamicMember member)
|
Adds a dynamic member to the collection. |
CreateMember(SessionInfo si, Member member): static DynamicMember
|
Creates a dynamic member from a Member instance.
|
CreateAndAddMember(SessionInfo si, Member member): DynamicMember
|
Creates a dynamic member from a Member instance and adds it to the collection.
|
GetAllMembers(): List<DynamicMember>
|
Gets all dynamic members in the collection. |
GetMember(int memberId): DynamicMember
|
Gets a dynamic member by its ID. |
GetMember(string memberName): DynamicMember
|
Gets a dynamic member by its name. |
GetMemberUsingExternalId(int externalMemberId): DynamicMember
|
Gets a dynamic member using its external ID. |
GetMemberUsingExternalName(string externalMemberName): DynamicMember
|
Gets a dynamic member using its external name. |
Clear()
|
Clears all dynamic members from the collection. |
GetOrCreateMemberId(this DynamicMemberCollection thisDynamicMemberCollection, DbConnInfo dbConnApp, DynamicDimensionArgs args, ref string name): static int
|
Gets or creates a member ID, ensuring it doesn't overlap with member IDs already present in OneStream.
|
CreateMember(this DynamicMemberCollection thisDynamicMemberCollection, DbConnInfo dbConnApp, DynamicDimensionArgs args, string name, string description): static DynamicMember
|
Creates a dynamic member with the specified name and description. |
CreateAndAddMember(this DynamicMemberCollection thisDynamicMemberCollection, DbConnInfo dbConnApp, DynamicDimensionArgs args, string name, string description): static DynamicMember
|
Creates a dynamic member with the specified name and description, and adds it to the collection.
|
CreateMember(this DynamicMemberCollection thisDynamicMemberCollection, DbConnInfo dbConnApp, DynamicDimensionArgs args, string name, string description, int externalMemberId, string externalMemberName, object tag): static DynamicMember
|
Creates a dynamic member with the specified name, description, external ID, external name, and tag. |
CreateAndAddMember(this DynamicMemberCollection thisDynamicMemberCollection, DbConnInfo dbConnApp, DynamicDimensionArgs args, string name, string description, int externalMemberId, string externalMemberName, object tag): static DynamicMember
|
Creates and adds a dynamic member with the specified name, description, external ID, external name, and tag. |
DynamicRelationship
The DynamicRelationship
object represents a relationship between a parent DynamicMember and child DynamicMember, including the aggregation weight.
Properties
ParentMember: DynamicMember
|
Gets or sets the parent member. |
ChildMember: DynamicMember
|
Gets or sets the child member. |
AggregationWeight: decimal
|
Gets or sets the aggregation weight. |
Constructors
DynamicRelationship()
|
Initializes a new instance of the DynamicRelationship class.
|
DynamicRelationship(DynamicMember parentMember, DynamicMember childMember, decimal aggregationWeight)
|
Initializes a new instance of the DynamicRelationship class with the specified parent member, child member, and aggregation weight.
|
DynamicRelationshipCollection
The DynamicRelationshipCollection class is responsible for managing all relationships in a Dynamic Dimension. It contains a number of utility methods for creating Relationships, which can be added to the actual collection.
Properties
Count: int
|
Gets the number of relationships in the collection. |
Constructors
DynamicRelationshipCollection()
|
Initializes a new instance of the DynamicRelationshipCollection class.
|
Methods
Add(DynamicRelationship relationship)
|
Adds a dynamic relationship to the collection. |
CreateRelationship(SessionInfo si, DynamicMember parentMember, DynamicMember childMember): DynamicRelationship
|
Creates a dynamic relationship with the specified parent member and child member. |
CreateRelationship(SessionInfo si, DynamicMember parentMember, DynamicMember childMember, long siblingSortOrder, decimal udAggWeight): DynamicRelationship
|
Creates a dynamic relationship with the specified parent member, child member, sibling sort order, and aggregation weight. |
CreateRelationship(SessionInfo si, DynamicMember parentMember, Member childMember): DynamicRelationship
|
Creates a dynamic relationship with the specified parent member and child member. |
CreateRelationship(SessionInfo si, DynamicMember parentMember, Member childMember, long siblingSortOrder, decimal udAggWeight): DynamicRelationship
|
Creates a dynamic relationship with the specified parent member, child member, sibling sort order, and aggregation weight. |
CreateRelationship(SessionInfo si, Member parentMember, DynamicMember childMember): DynamicRelationship
|
Creates a dynamic relationship with the specified parent member and child member. |
CreateRelationship(SessionInfo si, Member parentMember, DynamicMember childMember, long siblingSortOrder, decimal udAggWeight): DynamicRelationship
|
Creates a dynamic relationship with the specified parent member, child member, sibling sort order, and aggregation weight. |
CreateAndAddRelationship(SessionInfo si, DynamicMember parentMember, DynamicMember childMember): DynamicRelationship
|
Creates a dynamic relationship with the specified parent member and child member, and adds it to the collection.
|
CreateAndAddRelationship(SessionInfo si, DynamicMember parentMember, DynamicMember childMember, long siblingSortOrder, decimal udAggWeight): DynamicRelationship
|
Creates a dynamic relationship with the specified parent member, child member, sibling sort order, and aggregation weight, and adds it to the collection.
|
CreateAndAddRelationship(SessionInfo si, DynamicMember parentMember, Member childMember): DynamicRelationship
|
Creates a dynamic relationship with the specified parent member and child member, and adds it to the collection.
|
CreateAndAddRelationship(SessionInfo si, DynamicMember parentMember, Member childMember, long siblingSortOrder, decimal udAggWeight): DynamicRelationship
|
Creates a dynamic relationship with the specified parent member, child member, sibling sort order, and aggregation weight, and adds it to the collection.
|
CreateAndAddRelationship(SessionInfo si, Member parentMember, DynamicMember childMember): DynamicRelationship
|
Creates a dynamic relationship with the specified parent member and child member, and adds it to the collection.
|
CreateAndAddRelationship(SessionInfo si, Member parentMember, DynamicMember childMember, long siblingSortOrder, decimal udAggWeight): DynamicRelationship
|
Creates a dynamic relationship with the specified parent member, child member, sibling sort order, and aggregation weight, and adds it to the collection.
|
GetAllRelationships(): List<DynamicRelationship>
|
Gets all dynamic relationships in the collection. |
Clear()
|
Clears all dynamic relationships from the collection. |