Provides access to members that return information about an object class.
When To Use
The IObjectClassinterface is the main interface used to get the properties of an object class in a geodatabase. An object class is a feature class or table that has been registered with the geodatabase. For example, you can use the IObjectClassinterface to get a list of all the relationship classes in which an object class participates.
Members
Name | Description | |
---|---|---|
AddField | Adds a field to this object class. | |
AddIndex | Adds an index to this object class. | |
AliasName | The alias name of the object class. | |
CLSID | The GUID for the COM Class (CoClass) corresponding to instances of this object class. | |
DeleteField | Deletes a field from this object class. | |
DeleteIndex | Deletes an index from this object class. | |
EXTCLSID | The GUID for the COM Class (CoClass) corresponding to the class extension for this object class. | |
Extension | The extension for this object class. | |
ExtensionProperties | The extension properties for this object class. | |
Fields | The fields collection for this object class. | |
FindField | The index of the field with the specified name. | |
HasOID | Indicates if the class has an object identity (OID) field. | |
Indexes | The indexes collection for this object class. | |
ObjectClassID | The unique ID for the object class. | |
OIDFieldName | The name of the field corresponding to the OID. | |
RelationshipClasses | The relationship classes in which this object class participates in for the specified role. |
IObjectClass.AliasName Property
The alias name of the object class.
Public ReadOnly Property AliasName As String
public string AliasName {get;}
Description
Returns the alias name for the object class.
Remarks
Object classes in a geodatabase can have between one and three names. The name of the object class, which is the same as the name of the table in the DBMS in which the objects in the object class are stored, the alias name which the user can set for display purposes in end user applications. The third name is the model name which is a tool for developers of custom objects to use to guarantee the names of objects independent of the true name or alias name.
The AliasNameproperty returns the alias name for the object class. If the object class has no alias name, then AliasNamewill return the name of the object class (fully qualified if on ArcSDE). The alias name can be modified using the IClassSchemEditinterface.
IObjectClass.ObjectClassID Property
The unique ID for the object class.
Public ReadOnly Property ObjectClassID As Integer
public int ObjectClassID {get;}
Description
Returns the unique ID of the object class.
Remarks
Each feature class or table registered with the geodatabase is an object class. Object classes have a unique ID which distinguishes them from other object classes in the geodatabase. The ObjectClassIDproperty returns this ID as a long. The object class ID is assigned by the system when the class is created, or registered with the geodatabase, it cannot be modified.
Those feature classes and tables that are in the database, but not registered with the geodatabase will always have an object class ID of -1.
IObjectClass.RelationshipClasses Property
The relationship classes in which this object class participates in for the specified role.
Public Function get_RelationshipClasses ( _
ByVal Role As esriRelRole _
) As IEnumRelationshipClass
public IEnumRelationshipClass get_RelationshipClasses (
esriRelRole Role
);
Description
Returns an enumeration of the relationship classes in which the object class participates.
Remarks
Object classes in a geodatabase may participate in any number of relationships classes. The RelationshipClassesproperty allows you to get a list of those relationship classes that the object class participates in by what role it plays (origin, destination, or either) defined by the esriRelRoleenumeration used when you call this property. This property returns a IEnumRelationshipClassinterface which you can use to loop through those relationship classes that are returned.
Inherited Interfaces
Interfaces | Description |
---|---|
IClass | Provides access to members that return information about and manage the class. |
Classes that implement IObjectClass
Classes | Description |
---|---|
FeatureClass | Esri Feature Class object. |
ObjectClass | Esri Object Class object. |
RasterBand (esriDataSourcesRaster) | A representation of a single band of a raster dataset on disk. |
RasterCatalog | A collection of raster datasets in a Geodatabase table. |
RelQueryTable | An object that joins two datasets based on common data values. |
XYEventSource | XY event source object. |
Remarks
All object classes support the IObjectClassinterface and this interface inherits from the IClassinterface. The CLSID, EXTCLSID, and Extension for an ObjectClass may be obtained via the corresponding methods inherited from IClass.
For programming convenience, pre-existing tables in the host RDBMS also support the IObjectClassinterface even if they have not been registered with the Geodatabase. Such tables can be distinguished from registered object classes because they return an ObjectClassIDof -1 and return False to the HasOIDmethod. New object classes in a Geodatabase that are created using the CreateTablemethod on the IFeatureWorkspaceinterface are automatically registered with the Geodatabase and assigned an object class ID.
If no AliasName has been defined for an object class, then the AliasName is equal to the Name.