SetRdsDatabase

Syntax

SetRdsDatabaseResult SetRdsDatabase(RdsDbId tRdsDb, SetRdsDatabaseArg tArg)

Parameters

tRdsDb. Moniker of opened MDM repository instance.

tArg. Operation execution parameters.

Description

The SetRdsDatabase operation changes MDM repository metadata.

Comments

To execute the operation, in the tRdsDb field specify moniker of opened MDM repository instance, and in the tArg field specify changing parameters. The moniker can be obtained on executing the OpenRdsDatabase operation. In the tArg.pattern field specify the pattern that will be used to make changes, and in the tArg.meta field specify the updated MDM repository metadata.

To save changes after executing the SetRdsDatabase operation execute the SaveObject or SaveObjectAs operation.

The SetRdsDatabase operation results in the MDM repository moniker and updated metadata that can be requested in the tArg.metaGet pattern.

Example

Below is the example of changing MDM repository metadata. The request contains moniker of opened MDM repository instance, the pattern specifying whether it is required to change database, and description of a new database. The response contains updated information about MDM repository metadata.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SetRdsDatabase xmlns="http://www.fsight.ru/PP.SOM.Som">
<tRdsDb xmlns="">
  <id>S1!M!S!RD1</id>
  </tRdsDb>
<tArg xmlns="">
<pattern>
  <obInst>true</obInst>
  <db>true</db>
  </pattern>
<meta>
<db isShortcut="false" isLink="false" hf="false">
  <i>DB_DATA</i>
  <n>Database</n>
  <k>174189</k>
  <c>513</c>
  <p>9050</p>
  <h>false</h>
  <hasPrv>false</hasPrv>
  <ic>false</ic>
  </db>
  </meta>
<metaGet>
  <obInst>true</obInst>
  <all>true</all>
  </metaGet>
  </tArg>
  </SetRdsDatabase>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<SetRdsDatabaseResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<id xmlns="">
  <id>S1!M!S!RD1</id>
  </id>
<meta xmlns="">
<obInst>
<obDesc ds="" isShortcut="0" isLink="0" ver="2" hf="0">
  <i>RDS_DATABASE</i>
  <n>MDM repository</n>
  <k>219759</k>
  <c>4353</c>
  <p>5610</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  <isPermanent>1</isPermanent>
  <isTemp>0</isTemp>
  </obDesc>
  </obInst>
  <dirty>1</dirty>
<db ds="" isShortcut="0" isLink="0" ver="24" hf="0">
  <i>DB_DATA</i>
  <n>Database</n>
  <k>174189</k>
  <c>513</c>
  <p>9050</p>
  <h>0</h>
  <hasPrv>0</hasPrv>
  <ic>0</ic>
  <trackElementDependents>0</trackElementDependents>
  </db>
  </meta>
  </SetRdsDatabaseResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SetRdsDatabase" :
{
"tRdsDb" :
{
"id" : "S1!M!S!RD1"
},
"tArg" :
{
"pattern" :
{
"obInst" : "true",
"db" : "true"
},
"meta" :
{
"db" :
{
"@isShortcut" : "false",
"@isLink" : "false",
"@hf" : "false",
"i" : "DB_DATA",
"n" : "Database",
"k" : "174189",
"c" : "513",
"p" : "9050",
"h" : "false",
"hasPrv" : "false",
"ic" : "false"
}
},
"metaGet" :
{
"obInst" : "true",
"all" : "true"
}
}
}
}

JSON response:

{
"SetRdsDatabaseResult" :
{
"id" :
{
"id" : "S1!M!S!RD1"
},
"meta" :
{
"obInst" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "2",
"@hf" : "0",
"i" : "RDS_DATABASE",
"n" : "MDM repository",
"k" : "219759",
"c" : "4353",
"p" : "5610",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"dirty" : "1",
"db" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "24",
"@hf" : "0",
"i" : "DB_DATA",
"n" : "Database",
"k" : "174189",
"c" : "513",
"p" : "9050",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
}
}
}
public static SetRdsDatabaseResult SetRDSDBMetadata(MbId mb, RdsDbId moniker, string dbId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
//Operation execution parameters
var tSet = new SetRdsDatabase()
{
tArg = new SetRdsDatabaseArg()
{
pattern = new RdsDatabaseMdPattern()
{
db = true
},
meta = new RdsDatabaseMd()
{
db = FindObjectById(mb, dbId)
},
metaGet = new RdsDatabaseMdPattern()
{
all = true
}
},
tRdsDb = moniker
};
// Change MDM repository metadata
var tResult = somClient.SetRdsDatabase(tSet);
return tResult;
}

See also:

Working with MDM Dictionaries