com.esri.arcgis.geodatabase
Interface ICodedValueDomain

All Superinterfaces:
Serializable
All Known Implementing Classes:
CodedValueDomain

public interface ICodedValueDomain
extends Serializable

Provides access to members that return and modify coded value domain values.

Description

The ICodedValueDomain interface is used to define new coded value domains and to get information about existing domains.

When To Use

ICodedValueDomain is the interface on a CodedValueDomain object used to get and set the properties of a coded value domain object. For example, use the ICodedValueDomain interface when creating a new CodedValueDomain to add and remove valid coded values.


Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 void addCode(Object value, String name)
          Adds a (value, name) code.
 void deleteCode(Object value)
          Deletes a code with the specified value.
 int getCodeCount()
          The number of codes for the associated attribute.
 String getName(int index)
          The code name for the specified code index.
 Object getValue(int index)
          The value for the specified code index.
 

Method Detail

getCodeCount

int getCodeCount()
                 throws IOException,
                        AutomationException
The number of codes for the associated attribute.

Description

The CodeCount property returns the number of codes in this coded value domain.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The values
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

String getName(int index)
               throws IOException,
                      AutomationException
The code name for the specified code index.

Product Availability

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

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

getValue

Object getValue(int index)
                throws IOException,
                       AutomationException
The value for the specified code index.

Product Availability

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

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

addCode

void addCode(Object value,
             String name)
             throws IOException,
                    AutomationException
Adds a (value, name) code.

Description

The AddCode method adds a code to the domain.

Remarks

The AddCode method adds a new coded value to the coded value domain. AddCode requires a value for the coded value as a Variant, and the name of the coded value, which is a user friendly description for that coded value, as a String. The value supplied for the variant parameter must be of the correct type for the domain (e.g., Numeric values for a numeric domain, string values for a string domain).
If AddCode is called on a domain that is already created, the IWorkspaceDomains2::AlterDomain method must be called to persist the change.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

deleteCode

void deleteCode(Object value)
                throws IOException,
                       AutomationException
Deletes a code with the specified value.

Description

DeleteCode function removes the coded value from this domain. The parameter represents the value of the coded value to be removed, not the description.

Remarks

If DeleteCode is called on a domain that is already created, the IWorkspaceDomains2::AlterDomain method must be called to persist the change.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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