|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IClass
Provides access to members that return information about and manage the class.
All tables support the IClass interface.
The CLSID property returns the globally unique identifier for the software component (COM coclass) representing the row objects stored and handed out by this table. Examples of the value of this property include the CLSIDs representing esriGeoDatabase.Row, esriGeoDatabase.Object, esriGeoDatabase.Feature, and esriGeoDatabase.AttributedRelationship.
The EXTCLSID property returns the globally unique identifier for the software component (COM coclass) representing the class extension associated with this Table. Class extensions are a mechanism whereby a developer can associate additional class level methods with an ObjectClass in the database.
The CLSID and EXTCLSID and other similar properties for a Table are stored in the geodatabase as part of the data dictionary information for the database. These properties link the behavior of the class (as implemented by software components in a DLL) with the data in the table.
The Extension property returns an interface on the ClassExtension associated with this Table.
The HasOID property may be used to test if this table has an Object ID column. Tables representing object classes and attributed relationship classes in a geodatabase will have an Object ID column whose values are unique and are assigned by the geodatabase as new objects and attributed relationships are created. The “Register With Geodatabase” command available on the context menu of a table in ArcCatalog can be used to register a pre-existing table in an RDBMS as an object class, this process will add an Object ID column to the table if needed.
The IClass interface also contains methods (inherited by ITable) to manage the collection of fields and indexes for a Table.
Method Summary | |
---|---|
void |
addField(IField field)
Adds a field to this object class. |
void |
addIndex(IIndex index)
Adds an index to this object class. |
void |
deleteField(IField field)
Deletes a field from this object class. |
void |
deleteIndex(IIndex index)
Deletes an index from this object class. |
int |
findField(String name)
The index of the field with the specified name. |
IUID |
getCLSID()
The GUID for the COM Class (CoClass) corresponding to instances of this object class. |
IUID |
getEXTCLSID()
The GUID for the COM Class (CoClass) corresponding to the class extension for this object class. |
Object |
getExtension()
The extension for this object class. |
IPropertySet |
getExtensionProperties()
The extension properties for this object class. |
IFields |
getFields()
The fields collection for this object class. |
IIndexes |
getIndexes()
The indexes collection for this object class. |
String |
getOIDFieldName()
The name of the field corresponding to the OID. |
boolean |
isHasOID()
Indicates if the class has an object identity (OID) field. |
Method Detail |
---|
int findField(String name) throws IOException, AutomationException
If FindField returns -1, the Field could not be found in the Fields collection.
Developers working with SDE should be aware of qualified field names and their impact on calls to FindField. For more information, see the IFields2 interface.
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IFields getFields() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IIndexes getIndexes() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addField(IField field) throws IOException, AutomationException
Prior to adding a new field to a class, an exclusive schema lock should be obtained using the ISchemaLock interface.
Attempting to add a new field that does not allow null values will fail, if the class already has data in it. The only solution is to recreate the class with the non-nullable field, then copy the rows from the original class into the new class.
field
- A reference to a com.esri.arcgis.geodatabase.IField (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void deleteField(IField field) throws IOException, AutomationException
DeleteField removes the specified field from a table, object class or feature class. Fields that are required by the Geodatabase and cannot be removed include:
Prior to deleting a field from a class, an exclusive schema lock should be obtained using the ISchemaLock interface.
// Assume we have a reference to a FeatureClass (pFC) IFields pFields; IField pField; pFields = pFC.getFields(); pField = pFields.getField(pFields.findField("MyField")); pFC.deleteField(pField);
field
- A reference to a com.esri.arcgis.geodatabase.IField (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addIndex(IIndex index) throws IOException, AutomationException
Prior to adding a new index to a class, an exclusive schema lock should be obtained using the ISchemaLock interface.
index
- A reference to a com.esri.arcgis.geodatabase.IIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void deleteIndex(IIndex index) throws IOException, AutomationException
Prior to deleting an index from a class, an exclusive schema lock should be obtained using the ISchemaLock interface.
index
- A reference to a com.esri.arcgis.geodatabase.IIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isHasOID() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getOIDFieldName() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IUID getCLSID() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IUID getEXTCLSID() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.Object getExtension() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IPropertySet getExtensionProperties() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |