IRdsCompoundDictionary.CheckDublicates

Syntax

CheckDublicates : Boolean;

Description

The CheckDublicates property determines whether similar elements can be added from sources into the composite MDM dictionary. If the property is set to True, it is not possible to add several similar elements from sources in a dictionary, otherwise, this possibility is available. By default the property is set to False.

Example

Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier.

Sub Main;

Var

MB: IMetabase;

NSI: IMetabaseObjectDescriptor;

CrInfo: IMetabaseObjectCreateInfo;

Dict: IRdsDictionary;

CompDict: IRdsCompoundDictionary;

CompSources: IRdsCompoundDictionarySources;

CompSource: IRdsCompoundDictionarySource;

Begin

MB := MetabaseClass.Active;

NSI := MB.ItemById("NSI_1");

Dict := MB.ItemByIdNamespace("Dict_1", NSI.Key).Bind As IRdsDictionary;

CrInfo := MB.CreateCreateInfo;

CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_RDS_COMPDICTIONARY;

CrInfo.Id := "CompDict_1";

CrInfo.Name := Compound MDM dictionary;

CrInfo.Parent := NSI;

CompDict := MB.CreateObject(CrInfo).Edit As IRdsCompoundDictionary;

CompDict.CheckDublicates := True;

CompSources := CompDict.Sources;

CompSource := CompSources.Add;

CompSource.Id := "New_Source";

CompSource.Name := New source dictionary;

CompSource.Source := Dict;

(CompDict As IMetabaseObject).Save;

End Sub Main;

After executing the example a new composite MDM dictionary is created. One source dictionary is added into a composite dictionary. It is prohibited to add duplicates from sources into composite dictionary.

See also:

IRdsCompoundDictionary