Interface IClassSchemaEdit

Namespace
ESRI.ArcGIS.Geodatabase
Assembly
ESRI.Server.Geodatabase.dll

Provides access to member to modify an object class schema.

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("64654191-E2E8-11D2-8A56-000000000000")]
public interface IClassSchemaEdit

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.

Methods

AlterAliasName(string)

The alias name of the object class.

void AlterAliasName(string Name)

Parameters

Name string

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.

AlterClassExtensionCLSID(UID, IPropertySet)

Changes the class extension COM class associated with this database class.

void AlterClassExtensionCLSID(UID ClassExtensionCLSID, IPropertySet classExtensionProperties)

Parameters

ClassExtensionCLSID UID
classExtensionProperties IPropertySet

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.

AlterDefaultValue(string, object)

The default value of the object class field.

void AlterDefaultValue(string FieldName, object Value)

Parameters

FieldName string
Value object

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.

AlterDomain(string, IDomain)

The default domain of the object class field.

void AlterDomain(string FieldName, IDomain Domain)

Parameters

FieldName string
Domain IDomain

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.

AlterFieldAliasName(string, string)

The alias name of the object class field.

void AlterFieldAliasName(string FieldName, string AliasName)

Parameters

FieldName string
AliasName string

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.

AlterFieldModelName(string, string)

The model name of the object class field.

void AlterFieldModelName(string FieldName, string ModelName)

Parameters

FieldName string
ModelName string

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.

AlterInstanceCLSID(UID)

Changes the instance COM class associated with this database class.

void AlterInstanceCLSID(UID InstanceCLSID)

Parameters

InstanceCLSID UID

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.

AlterModelName(string)

The model name of the object class.

void AlterModelName(string Name)

Parameters

Name string

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.

RegisterAsObjectClass(string, string)

Registers this class with the database, assigning it a class id and creating an object id column.

int RegisterAsObjectClass(string suggestedOIDFieldName, string ConfigKeyword)

Parameters

suggestedOIDFieldName string
ConfigKeyword string

Returns

int