IMetabase.FetchItem

Syntax

FetchItem(Key: Integer; [Options: Integer = 0]): IMetabaseObjectDescriptor;

Parameters

Key. Internal object key.

Options. Settings of the lazy loading of descriptions type by identifiers.

Description

The FetchItem method returns the description of the object or the object, for which the lazy loading of the description attribute is set by the key.

Comments

The example of the object with the lazy loading of description is the internal model of the metamodel calculation chain. The example of internal model creation is given in description of the IMsCalculationChainEntries.AddExclusiveModel.

The type of linked objects which require to download the description is specified in the Options parameter. If the computer memory contains cached descriptions, the method will load them.

If the repository uses lazy loading of descriptions, on executing the method the object description will be cached in memory. On the following requests the description will be taken from the computer cache. However, for the objects for which the IMetabaseObjectDescriptor.IsDeferred attribute is set, descriptions will not be cached. Working with these objects will be performed by the Fetch* methods.

Example

Executing the example requires that the repository contains an internal object with the 123 key.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    ObjDesc: IMetabaseObjectDescriptor;
Begin
    MB:= MetabaseClass.Active;
    ObjDesc:= MB.FetchItem(123);
    Debug.WriteLine (ObjDesc.Name);
End Sub UserProc;

After executing the example the development environment console displays the internal object name.

See also:

IMetabase