Keys


There is one very important property of keys to be found in the CIM Specification:

If a new subclass is defined from a superclass, and the superclass has key properties (including those inherited from other classes), the new subclass cannot define any additional key properties. New key properties in the subclass can be introduced only if all classes in the inheritance chain of the new subclass are keyless.

In the Core Model, for example, CIM_LogicalDevice is defined with four keys:

 class CIM_LogicalDevice : CIM_EnabledLogicalElement      {     [Propagated("CIM_System.CreationClassName"),          Key, MaxLen (256), Description (             "The scoping System's CreationClassName.") ]      string SystemCreationClassName;     [Propagated("CIM_System.Name"),         Key, MaxLen (256), Description (         "The scoping System's Name.") ]      string SystemName;     [Key, MaxLen (256), Description {         "CreationClassName indicates the name of the "         "class or the subclass used in the creation "         "of an instance. When used with the other key "         "properties of this class, this property allows "         "all instances of this class and its subclasses "         "to be uniquely identified.") ]     string CreationClassName;     [Key, MaxLen (64), Description (         "An address or other identifying information "         "to uniquely name the LogicalDevice.") ]     string DeviceID;     // fields deleted     }; 

This means that no subclass inheriting from CIM_LogicalDevice can have a key other than these four. See also the section on overriding below for more general details on the overriding of keys.




A Practical Approach to WBEM[s]CIM Management
A Practical Approach to WBEM[s]CIM Management
ISBN: 849323061
EAN: N/A
Year: 2006
Pages: 152

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net