Kinds of Version Collections

Meta Data Services Programming

Meta Data Services Programming

Kinds of Version Collections

Version collections are used to access repository object versions. There are seven kinds of version collections. All version collections inherit from the IVersionCol interface.

ObjectVersions Collection

RepositoryObjectVersion implements the ObjectVersions collection. The ObjectVersions collection contains all the versions of a particular repository object. For example, if you have multiple versions of the Column object, you can access all of them through the ObjectVersions collection. To establish this collection, use the get_ObjectVersions method of the IRepositoryObjectVersion interface.

Predecessor Collection

RepositoryObjectVersion implements the Predecessor collection. The Predecessor collection contains all the immediate predecessors of an object version. Although only one predecessor is the creation version, multiple predecessors can exist. For example, when you merge an object version into another, existing object version, the object version that you merge becomes a new, noncreation predecessor. To establish this collection, use the get_PredecessorVersions method of the IRepositoryObjectVersion interface.

Successor Collection

RepositoryObjectVersion implements the Successor collection. The Successor collection contains all the immediate successors of an object version. An immediate successor is an object that is one step away in the version graph. For example, if LoanTable_1 is versioned into two more loan tables (LoanTable_2 and LoanTable_3), both LoanTable_2 and LoanTable_3 are immediate successors. Subsequent versioning of LoanTable_2 and LoanTable_3 results in successors that are not part of the Successor collection of LoanTable_1. To establish this collection, use the get_SuccessorVersions method of the IRepositoryObjectVersion interface.

TargetVersions Collection

VersionedRelationship implements the TargetVersions collection. The TargetVersions collection contains the specific versions of a target object that are related to a particular version of a source object. For example, if a Table object is related to two versions of the same Column object, you can access both versions of the Column object through a TargetVersions collection. To establish this collection, use the get_TargetVersions method of the IVersionedRelationship interface.

Contents Collection

Workspace implements the Contents collection. The Contents collection contains all the object versions present in a workspace. Remember that, at most, one version of each object can appear in a workspace. So, at most, you will have only one instance of each object in a Contents collection. For example, if a workspace contains a Schema, Table, and a Tables collection, the Contents collection includes a Schema object, a Table object, and the Tables collection object. To establish this collection, use the get_Contents method of the IWorkspace interface.

Workspaces Collection

RepositoryObjectVersion implements the Workspaces collection. The Workspaces collection contains all the workspaces in which a particular object version is present. A repository object version can exist in multiple workspaces. For example, if you have one workspace for testing purposes and another workspace for production, both Workspaces can contain the same version of the same repository object. In this case, the Workspaces collection contains references to both workspaces. To establish this collection, use the get_Workspaces method of the IWorkspaceItem interface.

Checkouts Collection

Workspace implements the Checkouts collection. The Checkouts collection contains all the object versions checked out to a particular workspace (that is, all object versions that can be modified or removed within the context of a workspace). For more information, see Objects Within Workspaces. To establish this collection, use the get_Checkouts method of the IWorkspace interface.

See Also

IRepositoryObjectVersion Interface

IVersionCol Interface

IVersionedRelationship Interface

IWorkspace Interface

Navigating a Repository

Navigating the Version Graph

Retaining Workspace Context

Version Graph