IMetabaseUpdateContext.RegisterNullRemappingO

Fore Syntax

RegisterNullRemappingO(OwnObject: Integer; OldKey: Integer);

Fore.NET Syntax

RegisterNullRemappingO(OwnObject: uinteger; OldKey: uinteger);

Parameters

OwnObject. Owner of the object, for which repeated mapping is executed.

OldKey. Object, for which repeated mapping is executed.

Description

The RegisterNullRemappingO method executes zero repeated mapping for object taking into account parent object.

Comments

The method is used to create objects with partial loss of structure (information), in case if not all links to external objects are allowed.

Fore Example

Executing the example requires that the repository contains a table MDM dictionary with the MDM_INDICATOR_S identifier and a time series database with the TSDB_PEF_NULL identifier. The table MDM dictionary must be a child one for the time series database.

The file system must contain the C:\NullRemaps.pefx update file used to update a custom class object that depends on the MDM_INDICATOR_S dictionary and its parent.

Add a link to the Metabase system assembly.

Sub userProc;
Var
    MB: IMetabase;
    Update: IMetabaseUpdate;
    UpdateCxt: IMetabaseUpdateContext;
Begin
    // Get current repository
    MB := MetabaseClass.Active;
    // Create an update
    Update := Mb.CreateUpdate;
    // Load update parameters from file
    Update.LoadFromFileNF("C:\NullRemaps.pefx");
    // Create additional update settings
    UpdateCxt := Update.CreateUpdateContext;
    // Set zero mapping parameters for update elements
    UpdateCxt.RegisterNullRemappingO(Mb.ItemById("TSDB_PEF_NULL").Key, Mb.ItemById("MDM_INDICATOR_S").Key);
    // Perform update
    Update.ApplyEx(Null, UpdateCxt);
End Sub userProc;

After executing the example zero parameters of repeated mapping are set for the MDM_INDICATOR_S dictionary, on which custom class object depends. Then custom class object is updated.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Update: IMetabaseUpdate;
    UpdateCxt: IMetabaseUpdateContext;
Begin
    // Get current repository
    MB := Params.Metabase;
    // Create an update
    Update := Mb.CreateUpdate();
    // Load update parameters from file
    Update.LoadFromFileNF("C:\NullRemaps.pefx", UpdateLoadMode.ulmReplace);
    // Create additional update settings
    UpdateCxt := Update.CreateUpdateContext();
    // Set zero mapping parameters for update elements
    UpdateCxt.RegisterNullRemappingO(Mb.ItemById["TSDB_PEF_NULL"].Key, Mb.ItemById["MDM_INDICATOR_S"].Key);
    // Perform update
    Update.ApplyEx(Null, UpdateCxt);
End Sub;

See also:

IMetabaseUpdateContext