IMetabase.FetchItemById

Syntax

FetchItemById(Id: String; [Namespace_:Integer = 0;][Options: Integer = 0]): IMetabaseObjectDescriptor;

Parameters

Id. Identifier of internal object.

Namespace_. A namespace in which the specified identifiers are located.

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

Description

The FetchItemByld method returns the description of the object or the object, for which the deferred loading of the description attribute is set by the identifier.

Comments

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

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

If the repository uses the deferred loading of descriptions, then on execution of the method the description of the method is cached in the memory. On the following requests the description will be taken from the cache of the Computer. However for the objects for which the IMetabaseObjectDescriptor.IsDeferred attribute is set, the 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 Obj1 identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
Begin
    MB := MetabaseClass.Active;
    MDesc := MB.FetchItemById("Obj1");
    If MDesc <> Null Then
        Debug.WriteLine(MDesc.Name);
    End If;
End Sub UserProc;

After executing the example the name of inner object with the Obj1 identifier is displayed to the development environment console window.

See also:

IMetabase