IReposProperty Interface

Meta Data Services Programming

Meta Data Services Programming

IReposProperty Interface

The IReposProperty interface provides access to a persistent member (a property or collection) of an information model interface.

When you instantiate an Automation object that represents an object from your information model, and that object conforms to a class for which there is no custom implementation (in other words, you have provided no software implementation of the class), the repository engine provides an interface implementation for you. This interface implementation uses IRepositoryDispatch as its dispatch interface.

The IRepositoryDispatch interface is an enhanced IDispatch interface; in addition to all of the standard IDispatch methods, IRepositoryDispatch also provides access to the Properties collection. The Properties collection gives you a convenient mechanism to enumerate through all of the persistent properties and collections of an interface. The IReposProperty interface can be used to access the individual members in the Properties collection.

This support enables the Automation programmer to use syntax like the following:

Dim firstPropName As String
Let firstPropName = repObject.Properties(1).Name

The second statement resolves in the following way:

  • In this example, repObject is an Automation instantiation of a repository object where the default implementation has been used.

  • The Properties term is the Automation level name for the get_Properties method that is supplied by the IRepositoryDispatch interface.

  • The get_Properties method returns the interface pointer to the IReposProperties interface.

  • The default method of the IReposProperties interface is the get_Item method, which returns an IReposProperty interface pointer for the specified property object in the Properties collection.

  • The Name term is the Automation level name for the get_Name method that is supplied by the IReposProperty interface.

At this point, the Automation programmer has access to the name of the first property in the collection through the firstPropName variable.

When to Use

Use the IReposProperty interface to access a persistent interface member, when no custom implementation is available, and you do not already know the type or name of the member. With this interface, you can:

  • Retrieve the name of a property or collection.

  • Retrieve the type of a property or collection.

  • Get or set the value of a property.
Methods
IUnknown methods Description
QueryInterface Returns pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.

IDispatch methods 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.

IReposProperty methods Description
get_Type Retrieves the type of a persistent interface member.
get_Name Retrieves the name of a persistent interface member.
get_Value Retrieves the value of a persistent interface member.
put_Value Sets the value of a persistent property.

Remarks

Only persistent members (that is, members that are stored in the repository database) can be accessed by the IReposProperty interface.

See Also

ReposProperty Class

IReposProperties Interface

IRepositoryDispatch Interface