|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.interop.Dispatch com.esri.arcgis.geodatabase.IClassSchemaEditProxy
public class IClassSchemaEditProxy
Provides access to member to modify an object class schema.
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.
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.
IObjectClass
,
Serialized FormField 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 |
---|
public boolean noncastable
Constructor Detail |
---|
public IClassSchemaEditProxy()
public IClassSchemaEditProxy(Object obj) throws IOException
IOException
protected IClassSchemaEditProxy(Object obj, String iid) throws IOException
IOException
Method Detail |
---|
public void addListener(String iidStr, Object theListener, Object theSource) throws IOException
addListener
in class com.esri.arcgis.interop.Dispatch
IOException
public void removeListener(String iidStr, Object theListener) throws IOException
removeListener
in class com.esri.arcgis.interop.Dispatch
IOException
public int registerAsObjectClass(String suggestedOIDFieldName, String configKeyword) throws IOException, AutomationException
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.
registerAsObjectClass
in interface IClassSchemaEdit
suggestedOIDFieldName
- The suggestedOIDFieldName (in)configKeyword
- The configKeyword (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IObjectClass
public void alterInstanceCLSID(IUID instanceCLSID) throws IOException, AutomationException
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.
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.
alterInstanceCLSID
in interface IClassSchemaEdit
instanceCLSID
- A reference to a com.esri.arcgis.system.IUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void alterClassExtensionCLSID(IUID classExtensionCLSID, IPropertySet classExtensionProperties) throws IOException, AutomationException
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.
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.
alterClassExtensionCLSID
in interface IClassSchemaEdit
classExtensionCLSID
- A reference to a com.esri.arcgis.system.IUID (in)classExtensionProperties
- A reference to a com.esri.arcgis.system.IPropertySet (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void alterAliasName(String name) throws IOException, AutomationException
Alters the alias name for the object class.
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.
alterAliasName
in interface IClassSchemaEdit
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IObjectClass
public void alterFieldAliasName(String fieldName, String aliasName) throws IOException, AutomationException
Alters the alias name for a field in the object class.
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.
alterFieldAliasName
in interface IClassSchemaEdit
fieldName
- The fieldName (in)aliasName
- The aliasName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IField
public void alterModelName(String name) throws IOException, AutomationException
Alters the model name for the object class.
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.
alterModelName
in interface IClassSchemaEdit
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void alterFieldModelName(String fieldName, String modelName) throws IOException, AutomationException
Alters the model name for a field in the object class.
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.
alterFieldModelName
in interface IClassSchemaEdit
fieldName
- The fieldName (in)modelName
- The modelName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IField
public void alterDomain(String fieldName, IDomain domain) throws IOException, AutomationException
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.
alterDomain
in interface IClassSchemaEdit
fieldName
- The fieldName (in)domain
- A reference to a com.esri.arcgis.geodatabase.IDomain (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IField
public void alterDefaultValue(String fieldName, Object value) throws IOException, AutomationException
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.
alterDefaultValue
in interface IClassSchemaEdit
fieldName
- The fieldName (in)value
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IField
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |