RepositoryObject Object
A RepositoryObject is an object that is stored in a repository database and managed by the repository engine.
All repository objects are versioned. You can create new object versions explicitly using the RepositoryObjectVersion. The repository engine can create version information implicitly in cases where version information is unspecified or where legacy objects that were created prior to version support exist.
A RepositoryObjectVersion is a particular rendition of a RepositoryObject. Each version of an object can differ from other versions of that object in its property values and collections. When you manipulate a repository object within a Microsoft® Visual Basic® program, for example, you are actually manipulating a particular version of that object. That is, you manipulate a RepositoryObjectVersion.
You can declare any repository object version with the following line:
Dim newVersionedReposObject As RepositoryObjectVersion
In earlier releases of the repository engine, the object model included the RepositoryObject but not the RepositoryObjectVersion. If you have Visual Basic programs written against earlier releases, those programs might include declarations like the following:
Dim oldReposObject As RepositoryObject
These programs will continue to work with Microsoft SQL Server™ 2000 Meta Data Services because the repository object model still includes the RepositoryObject. As a result, the preceding declaration remains valid in Visual Basic. Whenever you manipulate an object, you actually manipulate a specific version of that object. So the object oldReposObject has the same members as any repository object version has. In effect, the following two lines of code are equivalent:
Dim myVersionedReposObject As RepositoryObjectVersion
Dim oldReposObject As RepositoryObject
Even though repository objects are now versioned, the repository object model includes the RepositoryObject so that you do not need to rewrite your Visual Basic programs that declare an object as a RepositoryObject.
When to Use
The RepositoryObjectVersion object supersedes RepositoryObject. However, if you already have application code that includes RepositoryObject, you can maintain that code using RepositoryObject. You can also use RepositoryObject to work with meta data that is not versioned.
Use the RepositoryObject object to manipulate the properties of a repository object, to delete a repository object, or to refresh the cached image of a repository object.
To create a new RepositoryObject, use the CreateObject method of the Repository session object.
Properties
Property | Description |
---|---|
ClassName | The name of a class that defines a repository object, as defined in an information model.
This property is not a default interface member. |
ClassType | The type of a class that defines a repository object, as defined in an information model.
This property is not a default interface member. |
Interface | The specified object interface. |
InternalID | The internal identifier that a repository instance uses to refer to a repository object. |
Name | The name of the repository object. |
ObjectID | The object identifier for the repository object. |
Repository | The open a repository instance through which this repository object was instantiated. |
Type | The type of the repository object. |
Methods
Method | Description |
---|---|
Delete | Deletes a repository object |
Lock | Locks the repository object |
Refresh | Refreshes the cached image of a repository object |
Collections
Collection | Description |
---|---|
Properties | The collection of all persistent properties that are attached to a RepositoryObject |