Defining a Target Object Collection

Meta Data Services Programming

Meta Data Services Programming

Defining a Target Object Collection

A target object collection is a kind of special-purpose collection that is designed for navigation. Since target object collections reduce navigation to a one-step operation, you should use target object collections for most of your navigation.

About Target Object Collections

A target object collection is the set of target objects that are associated with the relationships in a particular relationship collection. The relationship collection in the following figure is one example.

This relationship corresponds to this target object collection.

These associations are valid because the underlying data looks like this.

The object that is common to all of the relationships in the corresponding relationship collection is referred to as the source object. In the preceding figure, the object describing Frank is the source object. The objects describing Kim, Iola, and Fenton are target objects.

Implementing a Target Object Collection

A target object collection is represented as a property, which returns an ITargetObjectCol object. On this object, you can invoke QueryInterface to access the IRelationshipCol and IVersionCol interfaces.

To define a target object collection, use the ITargetObjectCol interface.

See Also

Defining Relationships and Collections

ITargetObjectCol Interface

Understanding Collections

Understanding Relationship Roles