com.esri.arcgis.geodatabase
Class IClassSchemaEditProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.IClassSchemaEditProxy
All Implemented Interfaces:
IClassSchemaEdit, Externalizable, Serializable
Direct Known Subclasses:
IClassSchemaEdit2Proxy

public class IClassSchemaEditProxy
extends com.esri.arcgis.interop.Dispatch
implements IClassSchemaEdit, 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, Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IClassSchemaEditProxy()
           
  IClassSchemaEditProxy(Object obj)
           
protected IClassSchemaEditProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 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.
 void removeListener(String iidStr, Object theListener)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IClassSchemaEditProxy

public IClassSchemaEditProxy()

IClassSchemaEditProxy

public IClassSchemaEditProxy(Object obj)
                      throws IOException
Throws:
IOException

IClassSchemaEditProxy

protected IClassSchemaEditProxy(Object obj,
                                String iid)
                         throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

registerAsObjectClass

public 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

Specified by:
registerAsObjectClass in interface IClassSchemaEdit
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

public 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

Specified by:
alterInstanceCLSID in interface IClassSchemaEdit
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

public 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

Specified by:
alterClassExtensionCLSID in interface IClassSchemaEdit
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

public 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

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

alterFieldAliasName

public 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

Specified by:
alterFieldAliasName in interface IClassSchemaEdit
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

public 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

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

alterFieldModelName

public 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

Specified by:
alterFieldModelName in interface IClassSchemaEdit
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

public 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

Specified by:
alterDomain in interface IClassSchemaEdit
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

public 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

Specified by:
alterDefaultValue in interface IClassSchemaEdit
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