RepositoryObject Class

See Also

A Repository object is an object that is stored in the Repository database and is managed by the Repository engine.

In this release of the Microsoft Repository, objects can be versioned. A Repository object version is a particular rendition of a Repository object. Each version of an object can differ from other versions of that object in its property values and collections. When you obtain a reference to a Repository object you actually are manipulating a particular version of that object. That is, you manipulate a RepositoryObjectVersion object. Because you manipulate particular versions of objects, you can declare any object with the following line of Visual Basic code:

Dim newReposObject   As RepositoryObjectVersion

In earlier releases of the Repository, the object model included the RepositoryObject class, but not the RepositoryObjectVersion class. If you have Visual Basic programs written against earlier releases of the Microsoft Repository, those programs might include declarations like the following:

Dim oldReposObject   As RepositoryObject

These programs will still work, because the Repository’s object model still includes the RepositoryObject object. Visual Basic still recognizes preceding declaration as valid. But remember, whenever you manipulate an object, you actually manipulate a specific version of that object. So the object oldReposObject, even though it is declared as a RepositoryObject, must conform to the RepositoryObjectVersion class.

To ensure that objects declared as RepositoryObject conform to the RepositoryobjectVersion class, the Repository uses the same Class Factory for both classes. In this way, any object that you declare as a Relationship implements the exact same methods as any object you declare as a VersionedRelationship. In effect, the following two lines of Visual Basic code are identical:

Dim myReposObject   As RepositoryObjectVersion
Dim myReposObject   As RepositoryObject