com.esri.arcgis.geodatabase
Interface IClassSchemaEdit

All Superinterfaces:
Serializable
All Known Subinterfaces:
IClassSchemaEdit2, IClassSchemaEdit3, IClassSchemaEdit4
All Known Implementing Classes:
FeatureClass, IClassSchemaEdit2Proxy, IClassSchemaEdit3Proxy, IClassSchemaEditProxy, ObjectClass, RasterCatalog, SchematicDiagramClass, SchematicElementClass

public interface IClassSchemaEdit
extends Serializable

Provides access to member to modify an object class schema.

Superseded By

IClassSchemaEdit3

Remarks

When using the IClassSchemaEdit object to alter an object class' class schema, you should first acquire an exclusive schema lock using the ISchemaLock interface to be sure that another application or user does not have the class open while you are trying to modify its schema.

You can QI for the IClassSchemaEdit interface from the IObjectClass interface.

When To Use

Use the IClassSchemaEdit interface when you want to modify the class properties of an object class, such as the class extension, model name, etc. You can also use this interface to register a table or feature class with the Geodatabase to make it a true object class.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
IObjectClass

Method Summary
 void alterAliasName(String name)
          The alias name of the object class.
 void alterClassExtensionCLSID(IUID classExtensionCLSID, IPropertySet classExtensionProperties)
          Changes the class extension COM class associated with this database class.
 void alterDefaultValue(String fieldName, Object value)
          The default value of the object class field.
 void alterDomain(String fieldName, IDomain domain)
          The default domain of the object class field.
 void alterFieldAliasName(String fieldName, String aliasName)
          The alias name of the object class field.
 void alterFieldModelName(String fieldName, String modelName)
          The model name of the object class field.
 void alterInstanceCLSID(IUID instanceCLSID)
          Changes the instance COM class associated with this database class.
 void alterModelName(String name)
          The model name of the object class.
 int registerAsObjectClass(String suggestedOIDFieldName, String configKeyword)
          Registers this class with the database, assigning it a class id and creating an object id column.
 

Method Detail

registerAsObjectClass

int registerAsObjectClass(String suggestedOIDFieldName,
                          String configKeyword)
                          throws IOException,
                                 AutomationException
Registers this class with the database, assigning it a class id and creating an object id column.

Description

The RegisterAsObjectClass method will register a table or feature class (ArcSDE layer) in the database with the Geodatabase. The act of registering the data as an object class will create records for the object class in the Geodatabase system tables and assign the object class a unique ID. Once a table or SDE layer is registered as an object class, it can participate in rules, topological relationships and relationships.

When registering a table or ArcSDE layer as an object class, an ObjectID field must be added to it. This field will contain the object IDs which uniquely identify each feature in the class. The object IDs for existing data will automatically be generated. Once a table or ArcSDE layer has been registered as an object class in the Geodatabase, it cannot be unregistered.

RegisterAsObjectClass takes two arguments: the name of the object ID field, and the ArcSDE configuration keyword to use for storage of the new data that is inserted into the object ID field. RegisterAsObjectClass returns a long which is the object class ID assigned to the newly registered class.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
suggestedOIDFieldName - The suggestedOIDFieldName (in)
configKeyword - The configKeyword (in)
Returns:
The objectClassID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IObjectClass

alterInstanceCLSID

void alterInstanceCLSID(IUID instanceCLSID)
                        throws IOException,
                               AutomationException
Changes the instance COM class associated with this database class.

Description

The AlterInstanceCLSID is used to change the behavior class for an object class in the Geodatabase. For example, you may have a class that stores simple feature objects and you want to change it to implement a custom object that you have developed. You use the AlterInstanceCLSID to do so.

Remarks

AlterInstanceCLSID will try to instantiate the object for the CLSID that you provide. If it fails to instantiate it, the method will fail. Therefore, you must have the DLL which has the implementation of your custom object registered on your system before you call AlterInstanceCLSID.

Before you QI for AlterInstanceCLSID, you will have had to open the object class. So, if this fails because you no longer have the DLL registered on your system, then you must use the IFeatureWorkspaceSchemaEdit interface to alter the instance CLSID.

No additional checking is done beyond instantiating the instance object. If the object class does not have the fields required for supporting the custom object then your class may not function with its new instance CLSID.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
instanceCLSID - A reference to a com.esri.arcgis.system.IUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

alterClassExtensionCLSID

void alterClassExtensionCLSID(IUID classExtensionCLSID,
                              IPropertySet classExtensionProperties)
                              throws IOException,
                                     AutomationException
Changes the class extension COM class associated with this database class.

Description

The AlterClassExtensionCLSID method is used to change the class extension for an object class in the Geodatabase. For example, you may have a class to which you want to associate a class extension that you have developed. You use the AlterClassExtensionCLSID to do so.

Remarks

AlterClassExtensionCLSID will try to instantiate the object for the class extension that you provide. If it fails to instantiate it, the method will fail. Therefore, you must have the DLL which has the implementation of your class extension registered on your system before you call AlterClassExtensionCLSID.

Before you QI for AlterClassExtensionCLSID, you will have had to open the object class. So, if this fails because you no longer have the DLL registered on your system for a class extension that is already associated with the class, then you must use the IFeatureWorkspaceSchemaEdit interface to alter the class extension CLSID.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
classExtensionCLSID - A reference to a com.esri.arcgis.system.IUID (in)
classExtensionProperties - A reference to a com.esri.arcgis.system.IPropertySet (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

alterAliasName

void alterAliasName(String name)
                    throws IOException,
                           AutomationException
The alias name of the object class.

Description

Alters 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 AlterAliasName method sets the alias name for the object class. The alias name can be returned using the IObjectClass interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IObjectClass

alterFieldAliasName

void alterFieldAliasName(String fieldName,
                         String aliasName)
                         throws IOException,
                                AutomationException
The alias name of the object class field.

Description

Alters the alias name for a field in the object class.

Remarks

Fields in object classes in a Geodatabase can have between one and three names. The name of the field, which is the same as the name of the field in 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 fields independent of the true name or alias name.

The AlterFieldAliasName method sets the alias name for a field in the object class. The alias name can be returned using the IField interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
fieldName - The fieldName (in)
aliasName - The aliasName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IField

alterModelName

void alterModelName(String name)
                    throws IOException,
                           AutomationException
The model name of the object class.

Description

Alters the model 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 AlterModelName method sets the model name for the object class. The model name can be returned using the IModelInfo interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

alterFieldModelName

void alterFieldModelName(String fieldName,
                         String modelName)
                         throws IOException,
                                AutomationException
The model name of the object class field.

Description

Alters the model name for a field in the object class.

Remarks

Fields in object classes in a Geodatabase can have between one and three names. The name of the field, which is the same as the name of the field in 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 fields independent of the true name or alias name.

The AlterFieldModelName method sets the model name for a field in the object class. The model name can be returned using the IModelInfo interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
fieldName - The fieldName (in)
modelName - The modelName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IField

alterDomain

void alterDomain(String fieldName,
                 IDomain domain)
                 throws IOException,
                        AutomationException
The default domain of the object class field.

Remarks

Domains are used in the Geodatabase to validate the contents of fields in an object class. For example, you can use a domain to specify a valid range of values, or a valid set of values for a particular field in an object class. You can assign domains to a field in an object class at either the class level, or the subtype level. The AlterDomain method on IClassSchemaEdit allows you to set a domain for a field at the class level.

AlterDomain takes as arguments the name of the field you want to associate a domain with as a string, and the domain you are associating as an IDomain. You can get an enumeration of domains in a workspace by calling the Domains or DomainsByFieldType methods on the IWorkspaceDomains interface.

Once a domain is associated with a field in your object class, the values in that field will be validated against that domain when a row in the object class is validated with the IValidate interface, or the Validate Selection command in the Editor.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
fieldName - The fieldName (in)
domain - A reference to a com.esri.arcgis.geodatabase.IDomain (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IField

alterDefaultValue

void alterDefaultValue(String fieldName,
                       Object value)
                       throws IOException,
                              AutomationException
The default value of the object class field.

Remarks

You can assign a default value to a field in an object class at either the class level, or the subtype level. The AlterDefaultValue method on IClassSchemaEdit allows you to set a default value for a field at the class level.

AlterDefaultValue takes as arguments the name of the field you want to associate a default value with as a string, and the default value you are associating as a variant. AlterDefaultValue will fail if the default value cannot be stored in the field.

Once a default value is associated with a field in your object class, you can use the InitDefaultValues method on IRowSubtypes to populate the fields in a object in your object class with its default value. This method is most often called after you have created a new feature or object in the object class, and before storing it.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
fieldName - The fieldName (in)
value - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IField