com.esri.arcgis.geodatabase
Interface IClassSchemaEditEx

All Superinterfaces:
Serializable
All Known Implementing Classes:
IClassSchemaEditExProxy, ObjectClass

public interface IClassSchemaEditEx
extends Serializable

Provides access to members that modify an object class schema.

Description

This interface can be used to convert a field of type GUID to type GlobalID or conversely to convert a field of type GlobalID to a field of type GUID.

These methods appy to unversioned ArcSDE feature classes and tables only.

Product Availability

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


Method Summary
 void registerGlobalIDColumn(String columnName)
          Registers this column as an Global ID with the database.
 void unregisterGlobalIDColumn(String columnName)
          Unregisters this column as an OID with the database.
 

Method Detail

registerGlobalIDColumn

void registerGlobalIDColumn(String columnName)
                            throws IOException,
                                   AutomationException
Registers this column as an Global ID with the database.

Remarks

This method converts a field of type GUID to a field of type GlobalID.

The object must reference an unversioned ArcSDE feature class or table. Use the IVersionedObject3::IsRegisteredAsVersioned property to determine if a dataset is versioned. Additionally the dataset must not be replicated. Use the IWorkspaceReplicasAdmin2::IsReferencedByReplica method to determine if the dataset is part of a replica.

A Global ID field must not already exist on the dataset referenced by the object. Use the IClassEx::HasGlobalID property to determine if a dataset has a Global ID field.

The columnName must reference a field of type GUID in the dataset referenced by the object. The IField::Type property can be used to determine a field type.

There must be no duplicate values in the GUID field. See the DataStatistics coclass for more information.

Another requirement is that the GUID field must be not nullable. See the IField::IsNullable property for more information. By default, GUID columns are nullable. However, when adding a GUID column to a dataset you can specify this field be not nullable. This is possible whether or not the dataset you are adding the new GUID field to already has populated rows. If you add a GUID column to a popluated dataset, and set the IsNullable property of this field to be false, the GUID values will be populated with a default value of {00000000-0000-0000-0000-000000000000}.

If you have a GUID field but it is nullable, to satisfy the requirements of this method, you can simply add a new GUID field, ensure you set the IsNullable property to false, and calculate the values from your GUID field into the newly added GUID field.

Errors will be returned if any of the above requirements are not met.

Product Availability

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

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

unregisterGlobalIDColumn

void unregisterGlobalIDColumn(String columnName)
                              throws IOException,
                                     AutomationException
Unregisters this column as an OID with the database.

Remarks

This method converts a field of type GlobalID to a field of type GUID.

The object must reference an unversioned ArcSDE feature class or table. Use the IVersionedObject3::IsRegisteredAsVersioned property to determine if a dataset is versioned. Additionally the dataset must not be replicated. Use the IWorkspaceReplicasAdmin2::IsReferencedByReplica method to determine if the dataset is part of a replica.

A Global ID field must not already exist on the dataset referenced by the object. Use the IClassEx::HasGlobalID property to determine if a dataset has a Global ID field.

The columnName must reference a field of type GlobalID in the dataset referenced by the object. The IField::Type property can be used to determine a field type.

Errors will be returned if any of the above requirements are not met.

Product Availability

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

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