IRubricatorCreator.AssignCube

Fore Syntax

AssignCube(Cube: IStandardCube);

Fore.NET Syntax

AssignCube(Cube: Prognoz.Platform.Interop.Cubes.IStandardCube);

Properties

Cube. Standard cube.

Description

The AssignCube method sets the cube, on which the time series database is based.

Comments

Use the IRubricatorCreator.CreateRubricator method co create a time series database.

Fore Example

Executing the example requires that the repository contains a standard cube with the STD_CUBE identifier and an MDM repository with the MDM_REPO identifier. The limits implemented to the standard cube:

Add links to the Metabase, Rds, Cubes system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    cr: IRubricatorCreator;
    CrInfo: IMetabaseObjectCreateInfo;
    mbObj: IMetabaseObject;
Begin
    mb := MetabaseClass.Active;
    cr := New RubricatorCreator.Create;
    // Specify repository
    cr.Metabase := mb;
    // Specify properties of created time series database
    CrInfo := cr.CreateInfo;
    CrInfo.Id := mb.generateId("RUBRICATOR");
    CrInfo.Name := Time series database on the cube;
    CrInfo.Parent := mb.Root;
    // Specify MDM repository
    mbObj := mb.ItemById("RDS_REPO").Bind;
    cr.RdsDatabase := mbObj As IRdsDatabase;
    // Specify standard cube
    mbObj := mb.ItemById("STD_CUBE").Bind;
    cr.AssignCube(mbObj As IStandardCube);
    // Specify time series database
    cr.CreateRubricator;
End Sub UserProc;   

Example execution result: the time series database that is based on a standard cube.

Fore.NET Example

Executing the example requires that the repository contains a standard cube with the STD_CUBE identifier and an MDM repository with the MDM_REPO identifier. The limits implemented to the standard cube:

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Rds;

[STAThread]
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    cr: IRubricatorCreator;
    CrInfo: IMetabaseObjectCreateInfo;
    mbObj: IMetabaseObject;
Begin
    mb := Params.Metabase;
    cr := New RubricatorCreator.Create();
    // Specify repository
    cr.Metabase := mb;
    // Specify properties of created time series database
    CrInfo := cr.CreateInfo;
    CrInfo.Id := mb.generateId["RUBRICATOR"0];
    CrInfo.Name := Time series database on the cube;
    CrInfo.Parent := mb.Root;
    // Specify MDM repository
    mbObj := mb.ItemById["RDS_REPO"].Bind();
    cr.RdsDatabase := mbObj As IRdsDatabase;
    // Specify standard cube
    mbObj := mb.ItemById["STD_CUBE"].Bind();
    cr.AssignCube(mbObj As IStandardCube);
    // Created time series database
    cr.CreateRubricator();
End Sub;

Example execution result: the time series database that is based on a standard cube.

See also:

IRubricatorCreator