IMetaHierarchy.LeafLoadExtent

Fore Syntax

LeafLoadExtent: Integer;

Fore.NET Syntax

LeafLoadExtent: integer;

Description

The LeafLoadExtent property limits the number of loaded leaf elements.

Comments

The bigger is the number of loaded leaf elements, the slower is the loading.

Fore Example

Executing the example requires that the repository contains a time series database with the FC_COMM identifier. Add links to the Metabase, Cubes, Rds system assemblies.

Sub UserProc;
Var
   mb: IMetabase;
    RubDesc: IMetabaseObjectDescriptor;
    RubrIn: IRubricatorInstance;
    DictInst: IMetaDictionaryInstance;
    HieDef: IMetaHierarchy;
    HieInst: IMetaHierarchyInstance;
    Mems: IMetaMembers;
Begin
    mb := MetabaseClass.Active;
    RubDesc := mb.ItemById("FC_COMM");
    RubrIn := RubDesc.Open(NullAs IRubricatorInstance;
    DictInst := RubrIn.GetDictionary(RubricatorDictionary.Facts);
    HieDef := DictInst.Dictionary.DefaultHierarchy;
    HieDef.Attributes.MoveAllTo(HieDef.Attributes, HieDef.Levels.Leaf);
// Set limitation
    HieDef.LeafLoadExtent := 128;
    HieInst := DictInst.OpenHierarchy(HieDef);
    Mems := HieInst.GetRootMembers;
    Mems.Reset;
    Repeat
        Debug.WriteLine(Mems.Current.Name);
        Mems.Next;
    Until Not Mems.Eof;
End Sub UserProc;

After executing the example, root element names of time series database hierarchy with limitations are displayed in the console window.

Fore.NET Example

Executing the example requires that the repository contains a time series database with the FC_COMM identifier.

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

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    RubDesc: IMetabaseObjectDescriptor;
    RubrIn: IRubricatorInstance;
    DictInst: IMetaDictionaryInstance;
    HieDef: IMetaHierarchy;
    HieInst: IMetaHierarchyInstance;
    Mems: IMetaMembers;
Begin
    mb := Params.Metabase;
    RubDesc := mb.ItemById["FC_COMM"];
    RubrIn := RubDesc.Open(NullAs IRubricatorInstance;
    DictInst := RubrIn.GetDictionary(RubricatorDictionary.rubdicFacts);
    HieDef := DictInst.Dictionary.DefaultHierarchy;
    HieDef.Attributes.MoveAllTo(HieDef.Attributes, HieDef.Levels.Leaf, -1True);
// Set limitation
    HieDef.LeafLoadExtent := 2;
    HieInst := DictInst.OpenHierarchy(HieDef);
    Mems := HieInst.GetRootMembers();
    Mems.Reset();
    Repeat
        System.Diagnostics.Debug.WriteLine(Mems.Current().Name);
        Mems.Next();
    Until Not Mems.Eof();
End Sub;

After executing the example, root element names of time series database hierarchy with limitations are displayed in the console window.

See also:

IMetaHierarchy