IMetabaseObject.CreateUpdateExParams

Syntax

CreateUpdateExParams: IMetabaseUpdateObjectExParams;

CreateUpdateExParams(): Prognoz.Platform.Interop.Metabase.IMetabaseUpdateObjectExParams;

Description

The CreateUpdateExParams method creates parameters of update of an object.

Example

Executing the example requires that repository schema contains the Dict_1 MDM dictionary.

Add links to the Metabase, Rds system assemblies.

Sub UserProc;
Var
    Mb: imetabase;
    MU: IMetabaseUpdate;
    Node: IMetabaseUpdateDataObjectNode;
    Object: IMetabaseObject;
    exParams: IMetabaseUpdateObjectExParams;
Begin
    Mb := MetabaseClass.Active;
    MU := Mb.CreateUpdate;
    Object := Mb.ItemById("Dict_1").Bind;
    Node := MU.RootFolder.Add(MetabaseUpdateNodeType.DataObject) As IMetabaseUpdateDataObjectNode;
    Node.Method := MetabaseUpdateMethod.All;
    exParams := Object.CreateUpdateExParams;
        If exParams Is IRdsDictionaryUpdateExParams Then
        (exParams As IRdsDictionaryUpdateExParams).PreserveAccessAttributes := True;
        End If;
    Node.ExtendedParams := exParams;
    Node.UpdatePart := MetabaseObjectUpdatePart.DataMetadata; //update data and metadata
    Node.PreserveExistingData := True// preserve elements absent in source object
    Node.Object := Object;
    MU.SaveToFileNF("C:\temp\Up1.pefx");
End Sub UserProc;
Imports Prognoz.Platform.Interop.Rds;
 
Public Shared Sub Main(Params: StartParams);
Var
    Mb: imetabase;
    MU: IMetabaseUpdate;
    Node: IMetabaseUpdateDataObjectNode;
    Object: IMetabaseObject;
    exParams: IMetabaseUpdateObjectExParams;
Begin
    Mb := Params.Metabase;
    MU := Mb.CreateUpdate();
    Object := Mb.ItemById[
"Dict_1"].Bind();
    Node := MU.RootFolder.Add(MetabaseUpdateNodeType.untDataObject) 
As IMetabaseUpdateDataObjectNode;
    Node.Method := MetabaseUpdateMethod.mumAll;
    exParams := Object.CreateUpdateExParams();
        
If exParams Is IRdsDictionaryUpdateExParams Then
        (exParams 
As IRdsDictionaryUpdateExParams).PreserveAccessAttributes := True;
        
End If;
    Node.ExtendedParams := exParams;
    Node.UpdatePart := MetabaseObjectUpdatePart.moupDataMetadata; 
//update data and metadata
    Node.PreserveExistingData := True// preserve elements absent in source object
    Node.Object := Object;
    
MU.SaveToFileNF("C:\" + "Update.pefx");
End Sub;

 

After executing this example file of update is created. The MDM dictionary Dict_1 is included in this update. Attributes update responsible for access permissions is disabled for a dictionary.

See also:

IMetabaseObject