SetRdsDatabaseResult SetRdsDatabase(RdsDbId tRdsDb, SetRdsDatabaseArg tArg)
tRdsDb. Moniker of opened MDM repository instance.
tArg. Operation execution parameters.
The SetRdsDatabase operation changes MDM repository metadata.
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.
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.
{
"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"
}
}
}
}
{
"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: