|
|||||||||
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.IWorkspaceDomainsProxy
public class IWorkspaceDomainsProxy
Provides access to members that return information about domains and allows you to add or delete domains.
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).
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 |
---|
public boolean noncastable
Constructor Detail |
---|
public IWorkspaceDomainsProxy()
public IWorkspaceDomainsProxy(Object obj) throws IOException
IOException
protected IWorkspaceDomainsProxy(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 addDomain(IDomain domain) throws IOException, AutomationException
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).
addDomain
in interface IWorkspaceDomains
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.public boolean isCanDeleteDomain(String domainName) throws IOException, AutomationException
isCanDeleteDomain
in interface IWorkspaceDomains
domainName
- The domainName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteDomain(String domainName) throws IOException, AutomationException
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.
deleteDomain
in interface IWorkspaceDomains
domainName
- The domainName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumDomain getDomains() throws IOException, AutomationException
The Domains property returns an IEnumDomains enumerator for all of the domains from the underlying workspace.
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.
getDomains
in interface IWorkspaceDomains
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IDomain getDomainByName(String domainName) throws IOException, AutomationException
getDomainByName
in interface IWorkspaceDomains
domainName
- The domainName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumDomain getDomainsByFieldType(int type) throws IOException, AutomationException
getDomainsByFieldType
in interface IWorkspaceDomains
type
- A com.esri.arcgis.geodatabase.esriFieldType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |