Normally, a name is associated with a Microsoft® Repository object through a naming relationship. The collection for such a relationship provides the scope for the name, and can require that all names in the collection be unique. This is the preferred method for naming objects, when a given object will be the destination of only one naming relationship.
If your information model contains a class that is not the destination of a naming relationship type, or is the destination of multiple relationship types, but no single relationship type is the obvious choice to be the naming relationship type, you can attach the Name property to the class. This is accomplished by defining your class to implement the INamedObject interface. If your class implements the INamedObject interface, the Repository engine will use that interface when asked to retrieve or set an object name.
Use the INamedObject interface to access the Name property of a repository object that exposes this interface.
Property | Description |
Name | The name of the object. |
IUnknown Method | Description |
QueryInterface | Returns pointers to supported interfaces. |
AddRef | Increments the reference count. |
Release | Decrements the reference count. |
IDispatch Method | Description |
GetIDsOfNames | Maps a single member and a set of argument names to a corresponding set of dispatch identifiers. |
GetTypeInfo | Retrieves a type information object, which can be used to get the type information for an interface. |
GetTypeInfoCount | Retrieves the number of type information interfaces that an object provides (either 0 or 1). |
Invoke | Provides access to properties and methods exposed by an Automation object. |
IRepositoryDispatch Method | Description |
get_Properties | Retrieves the IReposProperties interface pointer. The IReposProperties interface provides access to the persistent members exposed by the INamedObject interface. |
None of the standard Repository engine or Type Information Model classes implement the INamedObject interface. However, the Repository engine does use the INamedObject interface, if it is exposed by a repository object.
When the IRepositoryItem::get_Name method is invoked for a Repository object, the Repository engine will perform these steps to retrieve the name:
When the IRepositoryItem::put_Name method is invoked for a Repository object, the Repository engine will perform these steps to set the name: