|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IWorkspaceDomains
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).
Method Summary | |
---|---|
int |
addDomain(IDomain domain)
Adds the given domain to the workspace. |
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. |
Method Detail |
---|
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).
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.boolean isCanDeleteDomain(String domainName) throws IOException, AutomationException
domainName
- The domainName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
domainName
- The domainName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IDomain getDomainByName(String domainName) throws IOException, AutomationException
domainName
- The domainName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumDomain getDomainsByFieldType(int type) throws IOException, AutomationException
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 |