com.esri.arcgis.geodatabase
Class IWorkspaceDomainsProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.IWorkspaceDomainsProxy
All Implemented Interfaces:
IWorkspaceDomains, Externalizable, Serializable
Direct Known Subclasses:
IWorkspaceDomains2Proxy

public class IWorkspaceDomainsProxy
extends com.esri.arcgis.interop.Dispatch
implements IWorkspaceDomains, Serializable

Provides access to members that return information about domains and allows you to add or delete domains.

Superseded By

IWorkspaceDomains2

Remarks

The IWorkspaceDomains interface is used for managing the collection of domains found within a workspace. Domains may be shared between fields in different object classes, thus they are managed (that is, created, deleted and modified) at the workspace level. It is important to keep in mind that a domain may not be deleted from a workspace if any field in an object class currently uses it. Domain names are also unique across a workspace; if you attempt to add a domain to a workspace and the specified name is already associated with an existing domain, an error will be returned.

Three of the four properties on the IWorkspaceDomain interface are used for returning to the user the domains that are currently associated with the workspace. The user can either request all of the domains (Domains), a particular domain by name (DomainByName), or all the domains that may be associated with a given field type (DomainsByFieldType).

Product Availability

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

See Also:
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
  IWorkspaceDomainsProxy()
           
  IWorkspaceDomainsProxy(Object obj)
           
protected IWorkspaceDomainsProxy(Object obj, String iid)
           
 
Method Summary
 int addDomain(IDomain domain)
          Adds the given domain to the workspace.
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void deleteDomain(String domainName)
          Deletes the given domain from the workspace.
 IDomain getDomainByName(String domainName)
          The domain with the given name from the workspace.
 IEnumDomain getDomains()
          All the domains in the workspace.
 IEnumDomain getDomainsByFieldType(int type)
          The domain with the given name from the workspace.
 boolean isCanDeleteDomain(String domainName)
          Indicates if the user can delete the domain.
 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

IWorkspaceDomainsProxy

public IWorkspaceDomainsProxy()

IWorkspaceDomainsProxy

public IWorkspaceDomainsProxy(Object obj)
                       throws IOException
Throws:
IOException

IWorkspaceDomainsProxy

protected IWorkspaceDomainsProxy(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

addDomain

public int addDomain(IDomain domain)
              throws IOException,
                     AutomationException
Adds the given domain to the workspace.

Remarks

The AddDomain method is used when adding a new domain to a workspace. An error will be returned if the domain name already exists on an existing domain within the workspace. AddDomain will return the identifier of the domain once it is added to the workspace.

An error will be raised if the domain name contains an invalid character when calling AddDomain. The list of invalid characters can be determined by using the ISQLSyntax::GetInvalidCharacters method, minus the slash (both / and \), hyphen (-), comma (,), and space characters.

If you are looking to assoicate an existing domain to a field (or subtype) see IClassSchemaEdit::AlterDomain (or ISubtypes::SetDomain).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addDomain in interface IWorkspaceDomains
Parameters:
domain - A reference to a com.esri.arcgis.geodatabase.IDomain (in)
Returns:
The domainID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanDeleteDomain

public boolean isCanDeleteDomain(String domainName)
                          throws IOException,
                                 AutomationException
Indicates if the user can delete the domain.

Product Availability

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

Specified by:
isCanDeleteDomain in interface IWorkspaceDomains
Parameters:
domainName - The domainName (in)
Returns:
The deletable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteDomain

public void deleteDomain(String domainName)
                  throws IOException,
                         AutomationException
Deletes the given domain from the workspace.

Remarks

This method will delete a domain from the workspace. For DeleteDomain to execute successfully, you must be connected to the workspace as the user who created the domain you are deleting, and the domain must not be in use by any object classes in the database. Use the CanDeleteDomain property to determine if a domain can be deleted. To unassociate a domain with a field, use the IClassSchemaEdit::AlterDomain method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDomains

public IEnumDomain getDomains()
                       throws IOException,
                              AutomationException
All the domains in the workspace.

Description

The Domains property returns an IEnumDomains enumerator for all of the domains from the underlying workspace.

Remarks

This property return an enumeration of all of the domains on a workspace as an IEnumDomain. You can loop through this enumeration to get each domain.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDomains in interface IWorkspaceDomains
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumDomain
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDomainByName

public IDomain getDomainByName(String domainName)
                        throws IOException,
                               AutomationException
The domain with the given name from the workspace.

Product Availability

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

Specified by:
getDomainByName in interface IWorkspaceDomains
Parameters:
domainName - The domainName (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IDomain
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDomainsByFieldType

public IEnumDomain getDomainsByFieldType(int type)
                                  throws IOException,
                                         AutomationException
The domain with the given name from the workspace.

Product Availability

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

Specified by:
getDomainsByFieldType in interface IWorkspaceDomains
Parameters:
type - A com.esri.arcgis.geodatabase.esriFieldType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumDomain
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.