com.esri.arcgis.datasourcesGDB
Class SqlWorkspace

java.lang.Object
  extended by com.esri.arcgis.datasourcesGDB.SqlWorkspace
All Implemented Interfaces:
IDatabaseConnectionInfo, IDatabaseConnectionInfo2, IDataset, IFeatureWorkspace, ISQLSyntax, ISqlWorkspace, IWorkspace, IWorkspaceConfiguration, IWorkspaceProperties, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, Serializable

public class SqlWorkspace
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IDataset, IWorkspace, IWorkspaceProperties, ISQLSyntax, IDatabaseConnectionInfo2, ISqlWorkspace, ISupportErrorInfo, IFeatureWorkspace, IWorkspaceConfiguration

Sql workspace

Product Availability

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

See Also:
Serialized Form

Constructor Summary
SqlWorkspace(Object obj)
          Construct a SqlWorkspace using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean canCopy()
          True if this dataset can be copied.
 boolean canDelete()
          True if this dataset can be deleted.
 boolean canRename()
          True if this dataset can be renamed.
 void checkDatasetName(String name, IQueryDescription pQueryDescription, String[] pNewName)
          Returns unique name in the workspace.
 IDataset copy(String copyName, IWorkspace copyWorkspace)
          Copies this dataset to a new dataset with the specified name.
 IFeatureClass createFeatureClass(String name, IFields fields, IUID cLSID, IUID eXTCLSID, int featureType, String shapeFieldName, String configKeyword)
          Creates a new standalone feature class under the workspace.
 IFeatureDataset createFeatureDataset(String name, ISpatialReference spatialReference)
          Creates a new feature dataset.
 IQueryDef createQueryDef()
          Create a query definition object.
 IRelationshipClass createRelationshipClass(String relClassName, IObjectClass originClass, IObjectClass destinationClass, String forwardLabel, String backwardLabel, int cardinality, int notification, boolean isComposite, boolean isAttributed, IFields relAttrFields, String originPrimaryKey, String destPrimaryKey, String originForeignKey, String destForeignKey)
          Creates a new relationship class.
 ITable createTable(String name, IFields fields, IUID cLSID, IUID eXTCLSID, String configKeyword)
          Creates a new table.
 void delete()
          Deletes this dataset.
 boolean equals(Object o)
          Compare this object with another
 void executeSQL(String sqlStmt)
          Executes the specified SQL statement.
 boolean exists()
          Checks if the workspace exists.
 String getBrowseName()
          The browse name of the dataset.
 String getCategory()
          The category of the dataset.
 void getColumns(String tableName, IStringArray[] ppColumnName, IStringArray[] ppColumnType, IVariantArray[] ppIsNullable, ILongArray[] ppSize, ILongArray[] ppPrecision, ILongArray[] ppScale)
          Returns column information for a table.
 IEnumConfigurationKeyword getConfigurationKeywords()
          The available configuration keywords.
 String getConnectedDatabase()
          The name of the connected database.
 String getConnectedUser()
          The name of the connected user.
 Object getConnectionCurrentDateTime()
          The current DBMS date/time.
 int getConnectionDBMS()
          The type of DBMS this workspace is connected to.
 IPropertySet getConnectionProperties()
          The connection properties of the workspace.
 String getConnectionServer()
          The server this workspace is connected to.
 IEnumDatasetName getDatasetNames(int datasetType)
          The DatasetNames in the workspace.
 IEnumDataset getDatasets(int datasetType)
          The datasets in the workspace.
 boolean getDelimitedIdentifierCase()
          True if DBMS's quoted identifiers are case sensitive.
 IName getFullName()
          The associated name object.
 String getFunctionName(int sqlFunc)
          DBMS dependent SQL function names.
 int getGeodatabaseServerClass()
          The ArcSDE server class.
 boolean getIdentifierCase()
          True if DBMS's identifiers are case sensitive.
 String getInvalidCharacters()
          The list of invalid characters used in literals (if any).
 String getInvalidStartingCharacters()
          The list of invalid characters used in literals (if any).
 IEnumBSTR getKeywords()
          The list of DBMS specific reserved keywords.
 String getName()
          The name of the Dataset.
 String getPathName()
          The file system full path of the workspace.
 IWorkspaceProperty getProperty(int propertyGroup, int propertyType)
          Information about this particular property.
 IPropertySet getPropertySet()
          The set of properties for the dataset.
 IQueryDescription getQueryDescription(String query)
          Get query properties including spatial based on the first record of the query.
 String getSpecialCharacter(int sqlSC)
          Special DBMS dependent SQL characters.
 boolean getStringComparisonCase()
          True if string comparisons are case sensitive.
 IEnumDataset getSubsets()
          Datasets contained within this dataset.
 int getSupportedClauses()
          Supported SQL clauses.
 int getSupportedPredicates()
          Supported SQL predicates.
 IStringArray getTables()
          Returns names of all the table.
 int getType()
          The type of the Dataset.
 IWorkspace getWorkspace()
          The workspace containing this dataset.
 IWorkspaceFactory getWorkspaceFactory()
          The factory that created the workspace.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 boolean isDirectory()
          TRUE if the workspace is a file system directory.
 IFeatureClass openFeatureClass(String name)
          Opens an existing feature class.
 IFeatureDataset openFeatureDataset(String name)
          Opens an existing feature dataset.
 IFeatureDataset openFeatureQuery(String queryName, IQueryDef queryDef)
          Opens a feature dataset containing a single feature class defined by the specified Query.
 ITable openQueryClass(String name, IQueryDescription pQueryDescription)
          Returns a table or a feature class based on a query.
 ICursor openQueryCursor(String query)
          Returns a cursor based on a query.
 IRelationshipClass openRelationshipClass(String name)
          Opens an existing relationship class.
 ITable openRelationshipQuery(IRelationshipClass relClass, boolean joinForward, IQueryFilter srcQueryFilter, ISelectionSet srcSelectionSet, String targetColumns, boolean doNotPushJoinToDB)
          The table of a relationship join query.
 ITable openTable(String name)
          Opens an existing table.
 void parseColumnName(String fullName, String[] dbName, String[] ownerName, String[] tableName, String[] columnName)
          Given a column name, determine its qualification parts.
 void parseTableName(String fullName, String[] dbName, String[] ownerName, String[] tableName)
          Given a table name, determine its qualification parts.
 String qualifyColumnName(String tableName, String columnName)
          Given a table name and column name, returns its fully qualified name.
 String qualifyTableName(String dbName, String ownerName, String tableName)
          Given a database, owner, and table name, return its fully qualified name.
 void rename(String name)
          Renames this Dataset.
 void setBrowseName(String name)
          The browse name of the dataset.
 void setProperty(int propertyGroup, int propertyType, IWorkspaceProperty workspaceProperty)
          Information about this particular property.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

SqlWorkspace

public SqlWorkspace(Object obj)
             throws IOException
Construct a SqlWorkspace using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to SqlWorkspace.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
SqlWorkspace o = (SqlWorkspace)obj; // will not work

SqlWorkspace o = new SqlWorkspace(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems SqlWorkspace theSqlWorkspace = (SqlWorkspace) obj;
Method Detail

equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getName

public String getName()
               throws IOException,
                      AutomationException
The name of the Dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getName in interface IDataset
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFullName

public IName getFullName()
                  throws IOException,
                         AutomationException
The associated name object.

Remarks

The FullName property returns a Name object for the dataset. The Name object can be persisted and provides a way to get back to the dataset in a future session of the application, via the Open method on the Name object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFullName in interface IDataset
Returns:
A reference to a com.esri.arcgis.system.IName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBrowseName

public String getBrowseName()
                     throws IOException,
                            AutomationException
The browse name of the dataset.

Remarks

BrowseName returns file names without their extension. For example, States.shp would appear as States.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getBrowseName in interface IDataset
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBrowseName

public void setBrowseName(String name)
                   throws IOException,
                          AutomationException
The browse name of the dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getType

public int getType()
            throws IOException,
                   AutomationException
The type of the Dataset.

Remarks

The Type property returns the an esriDatasetType value indicating the dataset type, such as esriDTTable or esriDTFeatureClass.

Example:


// Assume we have a reference to an IfeatureClass (pFeatureClass) IDataset pDataset = null;
pDataset = new IDatasetProxy(pFeatureClass);
System.out.println(pDataset.getName() + " " + pDataset.getType());
if(pFeatureClass != null){
pDataset = pFeatureClass.getFeatureDataset();
System.out.println(pDataset.getName() + " " + pDataset.getType());
}
pDataset = new IDatasetProxy(pDataset.getWorkspace());
System.out.println(pDataset.getName() + " " +
pDataset.getType());

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getType in interface IDataset
Specified by:
getType in interface IWorkspace
Returns:
A com.esri.arcgis.geodatabase.esriDatasetType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCategory

public String getCategory()
                   throws IOException,
                          AutomationException
The category of the dataset.

Remarks

IDataset::Category returns a description of the category of the dataset. The description returned from the Category property is the same value that is displayed in the Type column within the Contents tab in ArcCatalog. The value will contain a description of the dataset such as "Topology" prefixed with a description of the type of workspace containing the dataset such as "File Geodatabase".

The description returned from IDataset::Category may change between releases of ArcGIS. In addition to this, returned strings are localized, meaning that code relying on a specific string being provided may fail when deployed with a different version of ArcGIS than it was developed with, or when deployed to a client using a different language than it was developed with.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCategory in interface IDataset
Returns:
The category
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSubsets

public IEnumDataset getSubsets()
                        throws IOException,
                               AutomationException
Datasets contained within this dataset.

Description

The Subsets property returns other Dataset objects contained in this dataset.

Remarks

IDataset::Subsets is not supported for Graph objects such as a Geometric Network. To return the feature classes contained in a Geometric Network, use the IFeatureClassContainer interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getWorkspace

public IWorkspace getWorkspace()
                        throws IOException,
                               AutomationException
The workspace containing this dataset.

Description

The Workspace property returns the containing workspace for this dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getPropertySet

public IPropertySet getPropertySet()
                            throws IOException,
                                   AutomationException
The set of properties for the dataset.

Description

The PropertySet property is used to return any additional intrinsic properties (but not metadata properties) that may apply to the dataset. One use of this property is to distinguish between the types of File Geodatabase datafile formats. If called on a Feature Class or Table in a File Geodatabase the Datafile Format property can either be esriFGDBStandardDatafile or esriFGDBCompressedDatafile.

Most datasets do not implement this property and will either raise an error or return a null value if it's called. There are a handful of exceptions that will return property sets; these include the datasets from file geodatabases (as mentioned above) and coverages.

Remarks

Examples of intrinsic properties for which explicit methods exist include the SpatialReference and the Extent methods available on the IGeoDataset interface. In most cases this PropertySet will be empty.

IDataset::PropertySet is not supported for Graph objects such as a Geometric Network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPropertySet in interface IDataset
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canCopy

public boolean canCopy()
                throws IOException,
                       AutomationException
True if this dataset can be copied.

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

The CanCopy method is supported by:

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
canCopy in interface IDataset
Returns:
The canCopy
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

copy

public IDataset copy(String copyName,
                     IWorkspace copyWorkspace)
              throws IOException,
                     AutomationException
Copies this dataset to a new dataset with the specified name.

Remarks

IDataset::Copy should only be used with datasets from file-based data sources, such as shapefiles and coverages.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
copy in interface IDataset
Parameters:
copyName - The copyName (in)
copyWorkspace - A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canDelete

public boolean canDelete()
                  throws IOException,
                         AutomationException
True if this dataset can be deleted.

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
canDelete in interface IDataset
Returns:
The canDelete
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

delete

public void delete()
            throws IOException,
                   AutomationException
Deletes this dataset.

Remarks

Certain feature classes, such as network and topology feature classes, cannot be deleted until their containing objects are deleted.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
delete in interface IDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canRename

public boolean canRename()
                  throws IOException,
                         AutomationException
True if this dataset can be renamed.

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete or rename a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
canRename in interface IDataset
Returns:
The canRename
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

rename

public void rename(String name)
            throws IOException,
                   AutomationException
Renames this Dataset.

Remarks

IDataset::Rename does not support the renaming of Graph objects such as a Geometric Network. In addition, certain feature classes, such as network feature classes, cannot be renamed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getConnectionProperties

public IPropertySet getConnectionProperties()
                                     throws IOException,
                                            AutomationException
The connection properties of the workspace.

Remarks

The ConnectionProperties property of a workspace returns the set of named connection properties for this workspace.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getConnectionProperties in interface IWorkspace
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWorkspaceFactory

public IWorkspaceFactory getWorkspaceFactory()
                                      throws IOException,
                                             AutomationException
The factory that created the workspace.

Remarks

The WorkspaceFactory property can be used to get a reference back to the workspace factory for this workspace.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDatasets

public IEnumDataset getDatasets(int datasetType)
                         throws IOException,
                                AutomationException
The datasets in the workspace.

Product Availability

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

Specified by:
getDatasets in interface IWorkspace
Parameters:
datasetType - A com.esri.arcgis.geodatabase.esriDatasetType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDatasetNames

public IEnumDatasetName getDatasetNames(int datasetType)
                                 throws IOException,
                                        AutomationException
The DatasetNames in the workspace.

Product Availability

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

Specified by:
getDatasetNames in interface IWorkspace
Parameters:
datasetType - A com.esri.arcgis.geodatabase.esriDatasetType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumDatasetName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPathName

public String getPathName()
                   throws IOException,
                          AutomationException
The file system full path of the workspace.

Remarks

If a remote workspace is opened using connection properties, this will be empty.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPathName in interface IWorkspace
Returns:
The pathName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirectory

public boolean isDirectory()
                    throws IOException,
                           AutomationException
TRUE if the workspace is a file system directory.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirectory in interface IWorkspace
Returns:
The isDir
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

exists

public boolean exists()
               throws IOException,
                      AutomationException
Checks if the workspace exists.

Remarks

This method can be used with workspaces from file-based data sources to detect if they've been deleted by another application. For example, a shapefile workspace is a directory and can be deleted while the workspace is open.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
exists in interface IWorkspace
Returns:
The exists
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

executeSQL

public void executeSQL(String sqlStmt)
                throws IOException,
                       AutomationException
Executes the specified SQL statement.

Remarks

The ExecuteSQL method can be used to send an arbitrary SQL statement to the underlying database for execution. The statement can be any DDL (data definition language) or DML (data manipulation language) statement but can not return any result sets. The syntax for the SQL is as required by the underlying database. The workspace supports an optional ISQLSyntax interface that provides information to applications on aspects of the SQL Syntax for the underlying database.

To determine if a workspace supports the ExecutesSQL method, an application can check the value of the canExecuteSQLworkspace property via the optional IWorkspaceProperties interface. In general, this method is only supported on local and remote database workspaces.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getProperty

public IWorkspaceProperty getProperty(int propertyGroup,
                                      int propertyType)
                               throws IOException,
                                      AutomationException
Information about this particular property.

Product Availability

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

Specified by:
getProperty in interface IWorkspaceProperties
Parameters:
propertyGroup - A com.esri.arcgis.geodatabase.esriWorkspacePropertyGroupType constant (in)
propertyType - The propertyType (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspaceProperty
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setProperty

public void setProperty(int propertyGroup,
                        int propertyType,
                        IWorkspaceProperty workspaceProperty)
                 throws IOException,
                        AutomationException
Information about this particular property.

Product Availability

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

Specified by:
setProperty in interface IWorkspaceProperties
Parameters:
propertyGroup - A com.esri.arcgis.geodatabase.esriWorkspacePropertyGroupType constant (in)
propertyType - The propertyType (in)
workspaceProperty - A reference to a com.esri.arcgis.geodatabase.IWorkspaceProperty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

qualifyTableName

public String qualifyTableName(String dbName,
                               String ownerName,
                               String tableName)
                        throws IOException,
                               AutomationException
Given a database, owner, and table name, return its fully qualified name.

Remarks

Applications should use the QualifyTableName and QualifyColumnName methods to construct fully qualified dataset and column names.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
qualifyTableName in interface ISQLSyntax
Parameters:
dbName - The dbName (in)
ownerName - The ownerName (in)
tableName - The tableName (in)
Returns:
The fullName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

qualifyColumnName

public String qualifyColumnName(String tableName,
                                String columnName)
                         throws IOException,
                                AutomationException
Given a table name and column name, returns its fully qualified name.

Remarks

Applications should use the QualifyTableName and QualifyColumnName methods to construct fully qualified dataset and column names.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
qualifyColumnName in interface ISQLSyntax
Parameters:
tableName - The tableName (in)
columnName - The columnName (in)
Returns:
The fullName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

parseTableName

public void parseTableName(String fullName,
                           String[] dbName,
                           String[] ownerName,
                           String[] tableName)
                    throws IOException,
                           AutomationException
Given a table name, determine its qualification parts.

Remarks

Applications should use the ParseTableName method to split the fully qualified name of a table into its components (database, owner, table). ParseTableName can also be used to return the components of any fully qualified name of a dataset such as feature classes, feature datasets, geometric networks and topologies.

Applications that wish to be RDBMS independent should not assume that ‘.’ is the delimiter used to separate the components of a fully qualified dataset name. Use the QualifyTableName method to determine the qualified name of a dataset for a given workspace.

The FullName parameter refers to the fully qualified name of the dataset and is returned by the IDataset::Name property for a dataset in a geodatabase and the IDatasetName::Name property for a dataset name object. Both methods return the fully qualified name for the dataset.

Empty strings will be returned for arguments that do not apply to the underlying DBMS. For example, supplying a FullName parameter of "MyTable" to a Personal or File Geodatabase will result in:

dbName = ""

ownerName = ""

TableName = "MyTable"

While supplying a FullName parameter of "gdb.MyTable" to an ArcSDE Geodatabase on Oracle will result in:

dbName = ""

ownerName = "gdb"

TableName = "MyTable"

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
parseTableName in interface ISQLSyntax
Parameters:
fullName - The fullName (in)
dbName - The dbName (out: use single element array)
ownerName - The ownerName (out: use single element array)
tableName - The tableName (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

parseColumnName

public void parseColumnName(String fullName,
                            String[] dbName,
                            String[] ownerName,
                            String[] tableName,
                            String[] columnName)
                     throws IOException,
                            AutomationException
Given a column name, determine its qualification parts.

Remarks

Applications should use the ParseColumnName method to split the fully qualified name for a column in a table into its components (database, owner, table, column).

Applications that wish to be RDBMS independent should not assume that ‘.’ is the delimiter used to separate the components of a fully qualified dataset name. Use the QualifyColumnName method to determine the qualified name of a column of a table for a given workspace.

The FullName paramter can be returned from the IDataset::Name property for a dataset in a Geodatabase and the IDatasetName::Name property for a dataset name object. Both methods return the fully qualified name for the dataset (the name object for the dataset is itself obtained using the IDataset::FullName property).

Empty strings will be returned for arguments that do not apply to the underlying DBMS. For example, supplying a FullName parameter of "gdb.Greeley_Parcels_1.AREA" to an ArcSDE Geodatabase on Oracle will result in:

dbName = ""

ownerName = "gdb"

TableName = "Greeley_Parcels_1"

columnName = "AREA"

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
parseColumnName in interface ISQLSyntax
Parameters:
fullName - The fullName (in)
dbName - The dbName (out: use single element array)
ownerName - The ownerName (out: use single element array)
tableName - The tableName (out: use single element array)
columnName - The columnName (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFunctionName

public String getFunctionName(int sqlFunc)
                       throws IOException,
                              AutomationException
DBMS dependent SQL function names.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFunctionName in interface ISQLSyntax
Parameters:
sqlFunc - A com.esri.arcgis.geodatabase.esriSQLFunctionName constant (in)
Returns:
The pSqlFunctionName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpecialCharacter

public String getSpecialCharacter(int sqlSC)
                           throws IOException,
                                  AutomationException
Special DBMS dependent SQL characters.

Description

GetSpecialCharacter returns a String value that indicates which character is used to represent the esriSQLSpecialCharacters value specified.

Remarks

The GetSpecialCharacter can be used to return the DBMS dependent character that represents an SQL special character, including the following:

• esriSQL_WildcardManyMatch ( % in SQL_92, * in Jet 4.0)
• esriSQL_WildcardSingleMatch ( _ in SQL_92, ? in Jet 4.0)
• esriSQL_DelimitedIdentifierPrefix ( " in SQL_92, [ in Jet 4.0)
• esriSQL_DelimitedIdentifierSuffix (" in SQL_92, ] in Jet 4.0)

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSpecialCharacter in interface ISQLSyntax
Parameters:
sqlSC - A com.esri.arcgis.geodatabase.esriSQLSpecialCharacters constant (in)
Returns:
The pSpecialChar
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSupportedPredicates

public int getSupportedPredicates()
                           throws IOException,
                                  AutomationException
Supported SQL predicates.

Description

GetSupportedPredicates returns a Long value that indicates which of the esriSQLPredicates are supported.

A value of -1 indicates that all predicates are supported by the workspace, while a value of 0 indicates that no predicates are supported by the workspace. Bitwise AND operations can be used with the esriSQLPredicates enumeration's values to determine support for individual predicates.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSupportedPredicates in interface ISQLSyntax
Returns:
The pPredicates
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSupportedClauses

public int getSupportedClauses()
                        throws IOException,
                               AutomationException
Supported SQL clauses.

Description

GetSupportedClauses returns a Long value that indicates which of the esriSQLClauses are supported.

A value of -1 indicates that all clauses are supported by the workspace, while a value of 0 indicates that no clauses are supported by the workspace. Bitwise AND operations can be used with the esriSQLClauses enumeration's values to determine support for individual clauses.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSupportedClauses in interface ISQLSyntax
Returns:
The pClauses
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIdentifierCase

public boolean getIdentifierCase()
                          throws IOException,
                                 AutomationException
True if DBMS's identifiers are case sensitive.

Description

GetIdentifierCase returns a Boolean indicating whether identifiers are case sensitive in the DBMS of the underlying workspace.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getIdentifierCase in interface ISQLSyntax
Returns:
The pIsCaseSensitive
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDelimitedIdentifierCase

public boolean getDelimitedIdentifierCase()
                                   throws IOException,
                                          AutomationException
True if DBMS's quoted identifiers are case sensitive.

Description

GetDelimitedIdentifierCase returns a Boolean indicating whether delimited identifiers are case sensitive in the DBMS of the underlying workspace.
An identifier is delimited in most DBMSs with square brackets. A notable exception is Access, which uses quotation marks.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDelimitedIdentifierCase in interface ISQLSyntax
Returns:
The pIsCaseSensitive
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStringComparisonCase

public boolean getStringComparisonCase()
                                throws IOException,
                                       AutomationException
True if string comparisons are case sensitive.

Description

GetStringComparisonCase returns a Boolean indicating whether string comparison is case sensitive in the workspace's DBMS.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getStringComparisonCase in interface ISQLSyntax
Returns:
The pIsCaseSensitive
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getKeywords

public IEnumBSTR getKeywords()
                      throws IOException,
                             AutomationException
The list of DBMS specific reserved keywords.

Description

GetKeywords returns a IEnumBStr list of keywords that are specific to the DBMS of the Workspace object used as the query interface for ISQLSyntax .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getKeywords in interface ISQLSyntax
Returns:
A reference to a com.esri.arcgis.system.IEnumBSTR
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInvalidCharacters

public String getInvalidCharacters()
                            throws IOException,
                                   AutomationException
The list of invalid characters used in literals (if any).

Description

GetInvalidCharacters returns a String that contains all the invalid characters for the Workspace object used as the query interface for ISQLSyntax .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getInvalidCharacters in interface ISQLSyntax
Returns:
The pInvalidChars
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInvalidStartingCharacters

public String getInvalidStartingCharacters()
                                    throws IOException,
                                           AutomationException
The list of invalid characters used in literals (if any).

Description

GetInvalidStartingCharacters returns a String containing all the invalid starting characters for the DBMS that the Workspace object that was used as a query interface for the ISQLSyntax uses.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getInvalidStartingCharacters in interface ISQLSyntax
Returns:
The pInvalidChars
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConnectionDBMS

public int getConnectionDBMS()
                      throws IOException,
                             AutomationException
The type of DBMS this workspace is connected to.

Remarks

Returns an enumeration value corresponding to the connected DBMS. This might be particularly useful when implementing code that must access a number of different remote database types and depending on the underlying DBMS, change the code accordingly.

Product Availability

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

Specified by:
getConnectionDBMS in interface IDatabaseConnectionInfo2
Returns:
A com.esri.arcgis.geodatabase.esriConnectionDBMS constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConnectionCurrentDateTime

public Object getConnectionCurrentDateTime()
                                    throws IOException,
                                           AutomationException
The current DBMS date/time.

Product Availability

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

Specified by:
getConnectionCurrentDateTime in interface IDatabaseConnectionInfo2
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGeodatabaseServerClass

public int getGeodatabaseServerClass()
                              throws IOException,
                                     AutomationException
The ArcSDE server class.

Product Availability

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

Specified by:
getGeodatabaseServerClass in interface IDatabaseConnectionInfo2
Returns:
A com.esri.arcgis.geodatabase.esriGeodatabaseServerClassType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConnectionServer

public String getConnectionServer()
                           throws IOException,
                                  AutomationException
The server this workspace is connected to.

Product Availability

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

Specified by:
getConnectionServer in interface IDatabaseConnectionInfo2
Returns:
The server
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConnectedDatabase

public String getConnectedDatabase()
                            throws IOException,
                                   AutomationException
The name of the connected database. It may be different from the DATABASE property in the workspace's connection properties.

Remarks

If the underlying DBMS does not support multiple databases or is a Personal or File Geodatabase, the ConnectedDatabase property will return an empty string.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getConnectedDatabase in interface IDatabaseConnectionInfo
Returns:
The db
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConnectedUser

public String getConnectedUser()
                        throws IOException,
                               AutomationException
The name of the connected user. It may be different from the USER property in the workspace's connection properties.

Remarks

If used with a Personal or File Geodatabase, the ConnectedUser property will return an empty string.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getConnectedUser in interface IDatabaseConnectionInfo
Returns:
The user
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getQueryDescription

public IQueryDescription getQueryDescription(String query)
                                      throws IOException,
                                             AutomationException
Get query properties including spatial based on the first record of the query.

Product Availability

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

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

openQueryClass

public ITable openQueryClass(String name,
                             IQueryDescription pQueryDescription)
                      throws IOException,
                             AutomationException
Returns a table or a feature class based on a query.

Remarks

If ID mapping was defined in the query description passed into this method, the returned query class will include a virtual column containing unique IDs. Aside from cases where conflicts will occur, this column is named "ESRI_OID".

Product Availability

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

Specified by:
openQueryClass in interface ISqlWorkspace
Parameters:
name - The name (in)
pQueryDescription - A reference to a com.esri.arcgis.geodatabase.IQueryDescription (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ITable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openQueryCursor

public ICursor openQueryCursor(String query)
                        throws IOException,
                               AutomationException
Returns a cursor based on a query.

Remarks

A query cursor generally behaves like a non-recycling search cursor that returns read-only rows.

Product Availability

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

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

getTables

public IStringArray getTables()
                       throws IOException,
                              AutomationException
Returns names of all the table.

Product Availability

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

Specified by:
getTables in interface ISqlWorkspace
Returns:
A reference to a com.esri.arcgis.system.IStringArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getColumns

public void getColumns(String tableName,
                       IStringArray[] ppColumnName,
                       IStringArray[] ppColumnType,
                       IVariantArray[] ppIsNullable,
                       ILongArray[] ppSize,
                       ILongArray[] ppPrecision,
                       ILongArray[] ppScale)
                throws IOException,
                       AutomationException
Returns column information for a table.

Product Availability

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

Specified by:
getColumns in interface ISqlWorkspace
Parameters:
tableName - The tableName (in)
ppColumnName - A reference to a com.esri.arcgis.system.IStringArray (out: use single element array)
ppColumnType - A reference to a com.esri.arcgis.system.IStringArray (out: use single element array)
ppIsNullable - A reference to a com.esri.arcgis.system.IVariantArray (out: use single element array)
ppSize - A reference to a com.esri.arcgis.system.ILongArray (out: use single element array)
ppPrecision - A reference to a com.esri.arcgis.system.ILongArray (out: use single element array)
ppScale - A reference to a com.esri.arcgis.system.ILongArray (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

checkDatasetName

public void checkDatasetName(String name,
                             IQueryDescription pQueryDescription,
                             String[] pNewName)
                      throws IOException,
                             AutomationException
Returns unique name in the workspace.

Product Availability

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

Specified by:
checkDatasetName in interface ISqlWorkspace
Parameters:
name - The name (in)
pQueryDescription - A reference to a com.esri.arcgis.geodatabase.IQueryDescription (in)
pNewName - The pNewName (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openTable

public ITable openTable(String name)
                 throws IOException,
                        AutomationException
Opens an existing table.

Remarks

The OpenTable method can be used to open any existing table or object class in the workspace given its fully qualified name. The table object returned will always support the ITable interface. The returned table object will support additional interfaces depending on the type of table. For example, object classes will additionally support the IObjectClass interface.
Use the IDatabaseConnectionInfo interface to determine the User and Database (if applicable). ISQLSyntax::QualifyTableName can be used to determine the fully qualified name for a table. Use the NameExists method on the IWorkspace2 interface to determine if a table with the appropriate name exists in a geodatabase.
Some examples of how to use the name parameter of OpenTable are shown below:

For Coverage feature classes:
cover:feature("stream:arc")
For info tables:
cover:feature("stream.aat")
For Oracle tables:
gdb.Owners
For SQLServer tables:
fdo_data.gdb.Owners
For Informix tables:
bladetest2:gdb.Owners
The 4 tables associated with a Topology; T_#_DirtyAreas, T_#_PolyErrors, T_#_LineErrors and T_#_PointErrors cannot be directly edited. For this reason they cannot be opened and will fail with a general Geodatabase error.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createTable

public ITable createTable(String name,
                          IFields fields,
                          IUID cLSID,
                          IUID eXTCLSID,
                          String configKeyword)
                   throws IOException,
                          AutomationException
Creates a new table.

Remarks

The CreateTable method can be used to create a new table or object class in the workspace.

The optional CLSID and EXTCLSID parameters allow the calling application to specify the GUIDs for the objects that implement the instance and the class extension behavior for an object class. If no CLSID is passed in, then the resulting table is not registered in the geodatabase object class data dictionary (It will support the IObjectClass interface but will have an ObjectClassID of –1). Valid values for CLSID are esriGeoDatabase.Object or any non-spatial object that extends esriGeoDatabase.Object. CLSID must be set in order to apply a class extension with the EXTCLSID parameter.

The Fields object passed to the Fields parameter should not be an object retrieved from another class. If the new class is going to have the same fields as an existing class, cast the existing class' fields collection to the IClone interface, clone it, and use the cloned fields collection as input for this method.

The optional configurationKeyword parameter allows the application to control the physical layout for this table in the underlying RDBMS. For example, in an Oracle database, the configuration keyword controls the tablespace in which the table is created, the initial and next extents, and other properties. The configuration keywords for an ArcSDE instance are set up by the ArcSDE data administrator, the list of available keywords supported by a workspace may be obtained using the IWorkspaceConfiguration interface.

Note: Table or feature class names with the following prefixes are not supported:

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createTable in interface IFeatureWorkspace
Parameters:
name - The name (in)
fields - A reference to a com.esri.arcgis.geodatabase.IFields (in)
cLSID - A reference to a com.esri.arcgis.system.IUID (in)
eXTCLSID - A reference to a com.esri.arcgis.system.IUID (in)
configKeyword - The configKeyword (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ITable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openFeatureClass

public IFeatureClass openFeatureClass(String name)
                               throws IOException,
                                      AutomationException
Opens an existing feature class.

Remarks

The OpenFeatureClass method can be used to open any existing feature class in the workspace given its fully qualified name. Note that every feature class in a geodatabase has a unique fully qualified name, and the OpenFeatureClass method can be used to directly open feature classes that are part of a feature dataset (the feature dataset name does not need to be specified).

Use the IDatabaseConnectionInfo interface to determine the User and Database (if applicable). ISQLSyntax::QualifyTableName can be used to determine the fully qualified name for a feature class. Use the NameExists method on the IWorkspace2 interface to determine if a feature class with the appropriate name exists in a geodatabase.

Opening a feature class that participates in a topology or geometric network will also open all other feature classes participating in the topology or geometric network in memory.

Some examples of how to use the Name parameter of OpenFeatureClass are shown below:

For Coverage feature classes:
buildings:polygon
For Oracle feature classes (the owner prefix is unnecessary if you are connected as the owner of the feature class):
gdb.Buildings
For SQLServer feature classes:
fdo_data.gdb.Buildings
For Informix feature classes:
bladetest2:gdb.Buildings
For VPF feature classes:
ks032193:veg:vgfarea (library:coverage:feature class)
The library name for VPF data is case sensitive and must appear as it is stored in the LAT (Library Attribute Table)
The 4 tables associated with a Topology; T_#_DirtyAreas, T_#_PolyErrors, T_#_LineErrors and T_#_PointErrors cannot be directly edited. For this reason they cannot be opened and will fail with a general Geodatabase error.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createFeatureClass

public IFeatureClass createFeatureClass(String name,
                                        IFields fields,
                                        IUID cLSID,
                                        IUID eXTCLSID,
                                        int featureType,
                                        String shapeFieldName,
                                        String configKeyword)
                                 throws IOException,
                                        AutomationException
Creates a new standalone feature class under the workspace.

Remarks

The CreateFeatureClass method can be used to create a stand-alone feature class that is not part of a feature dataset. It takes, in addition to all the parameters that CreateTable takes, an esriFeatureType parameter that specifies the category of features to be stored in this feature class (i.e., esriFTSimple, esriFTComplexEdgeFeature) and a shape field name. The shape field name identifies the name of the field in the input fields collection that represents the shape field for the feature class.

The Fields object passed to the Fields parameter should not be an object retrieved from another class. If the new class is going to have the same fields as an existing class, cast the existing class' fields collection to the IClone interface, clone it, and use the cloned fields collection as input for this method.

The GeometryDef object associated with the shape field object must be fully setup with a spatial reference, grid properties, and the geometry type before calling CreateFeatureClass.

The following esriGeometryType enumeration values represent the valid geometry types for a new feature class' GeometryDef object: esriGeometryPoint, esriGeometryMultipoint, esriGeometryPolyline, esriGeometryPolygon, and esriGeometryMultiPatch.

If the feature class is being created in geodatabase then the fields collection must contain, at a minimum, an Object ID field and a Shape field. The required fields can be obtained from the class description for the type of object you wish to create (see the RequiredFields property on IObjectClassDescription).

The CLSID parameter is used to specify what type of feature will be contained by the class. If a null value is passed in for the CLSID, the geodatabase will return Feature instances from the class. In most cases, this is the desired behavior. If the feature class is used to store custom features, the GUID of the custom feature should be provided. Alternatively, the IClassSchemaEdit interface can be used to change the feature class' CLSID following creation.

The EXTCLSID parameter is used to specify what class will be instantiated as the feature class extension. This object must at least support the IClassExtension interface. If a null value is passed in for the EXTCLSID parameter, the feature class will not have a class extension associated with it. Since class extensions are not required, this is often the desired behavior. If the feature class should have an associated extension, the GUID of the class extension should be provided. Alternatively, the IClassSchemaEdit interface can be used to associate a class extension following creation.

The configurationKeywordparameter allows the application to control the physical layout for this table in the underlying RDBMS. For example, in the case of an Oracle database, the configuration keyword controls the tablespace in which the table is created, the initial and next extents, and other properties. The configuration keywords for an ArcSDE instance are set up by the ArcSDE data administrator, and the list of available keywords supported by a workspace may be obtained using the IWorkspaceConfigurationinterface.

If the workspace the feature class will be created in is a pre-9.2 geodatabase, you must ensure the GeometryDef references a low precision spatial reference. 9.1 and earlier versions of the geodatabase only support low precision spatial references, while 9.2 geodatabases require high precision spatial references. Use IControlPrecision2::IsHighPrecision to manage the precision level of the spatial reference used to create the feature class. Use the IGeodatabaseRelease interface to determine the release of the geodatabase.

Developers should be aware that calling this method on a shapefile workspace when a shapefile of the same name already exists will cause the existing shapefile to be deleted. To prevent this, check for the existence of a shapefile prior to calling this method.

Note:Table or feature class names with the following prefixes are not supported:


~ "gdb_"
~ "sde_"
~ "delta_"

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createFeatureClass in interface IFeatureWorkspace
Parameters:
name - The name (in)
fields - A reference to a com.esri.arcgis.geodatabase.IFields (in)
cLSID - A reference to a com.esri.arcgis.system.IUID (in)
eXTCLSID - A reference to a com.esri.arcgis.system.IUID (in)
featureType - A com.esri.arcgis.geodatabase.esriFeatureType constant (in)
shapeFieldName - The shapeFieldName (in)
configKeyword - The configKeyword (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openFeatureDataset

public IFeatureDataset openFeatureDataset(String name)
                                   throws IOException,
                                          AutomationException
Opens an existing feature dataset.

Remarks

The OpenFeatureDataset method can be used to open any existing feature dataset in the workspace given its fully qualified name.

Use the IDatabaseConnectionInfo interface to determine the User and Database (if applicable). ISQLSyntax::QualifyTableName can be used to determine the fully qualified name for a feature dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createFeatureDataset

public IFeatureDataset createFeatureDataset(String name,
                                            ISpatialReference spatialReference)
                                     throws IOException,
                                            AutomationException
Creates a new feature dataset.

Remarks

The CreateFeatureDataset method can be used to create a new FeatureDataset given its name and spatial reference. Methods supported by the returned feature dataset allow creation of feature classes in the feature dataset.

If the workspace the FeatureDataset will be created in is a pre-9.2 Geodatabase, you must ensure the spatial reference is a low precision spatial reference. 9.1 and earlier versions of the Geodatabase only support low precision spatial references, while 9.2 Geodatabases require high precision spatial references. Use IControlPrecision2::IsHighPrecision to manage the precision level of the spatial reference used to create the FeatureDataset. Use the IGeodatabaseRelease interface to determine the release of the geodatabase

Example:

 

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createFeatureDataset in interface IFeatureWorkspace
Parameters:
name - The name (in)
spatialReference - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createQueryDef

public IQueryDef createQueryDef()
                         throws IOException,
                                AutomationException
Create a query definition object.

Remarks

The CreateQueryDef method can be used to create a new query definition object that can be evaluated by returning a cursor.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

openFeatureQuery

public IFeatureDataset openFeatureQuery(String queryName,
                                        IQueryDef queryDef)
                                 throws IOException,
                                        AutomationException
Opens a feature dataset containing a single feature class defined by the specified Query.

Remarks

The OpenFeatureQuery can be used to open a virtual feature class whose definition is based on a QueryDef created using the CreateQueryDef method. The QueryDef can involve multiple tables as long as one of them is a feature class; the resulting virtual feature class can be used to construct a feature layer that can be added to a map. The shape column is required as part of the SubFields parameter of the QueryDef.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
openFeatureQuery in interface IFeatureWorkspace
Parameters:
queryName - The queryName (in)
queryDef - A reference to a com.esri.arcgis.geodatabase.IQueryDef (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openRelationshipClass

public IRelationshipClass openRelationshipClass(String name)
                                         throws IOException,
                                                AutomationException
Opens an existing relationship class.

Remarks

The OpenRelationshipClass method can be used to open any existing relationship class in the workspace given its fully qualified name.

Use the IDatabaseConnectionInfo interface to determine the User and Database (if applicable). ISQLSyntax::QualifyTableName can be used to determine the fully qualified name for a relationship class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

createRelationshipClass

public IRelationshipClass createRelationshipClass(String relClassName,
                                                  IObjectClass originClass,
                                                  IObjectClass destinationClass,
                                                  String forwardLabel,
                                                  String backwardLabel,
                                                  int cardinality,
                                                  int notification,
                                                  boolean isComposite,
                                                  boolean isAttributed,
                                                  IFields relAttrFields,
                                                  String originPrimaryKey,
                                                  String destPrimaryKey,
                                                  String originForeignKey,
                                                  String destForeignKey)
                                           throws IOException,
                                                  AutomationException
Creates a new relationship class.

Remarks

The CreateRelationshipClass method can be used to create a new stand-alone relationship class that is not part of a feature dataset. The relationship class is implemented as a separate data table whose name is the name of the relationship class if the cardinality is many-to-many or if the relationship class is attributed. The relAttribFields parameter is optional, and a null value may be passed in for non-attributed relationship classes.

Many-to-many or attributed relationship classes require specification of all four key fields—the OriginPrimaryKey and the destPrimaryKey parameters are the primary key fields for the origin and destination object classes. The OriginForeignKey and destForeignKey parameters are the names of the corresponding foreign keys that will be created in the data table representing the relationship class. If the relationship class is one-to-one or one-to-many and not attributed, then the relationship class is implemented as a foreign key field in the destination object class (the OriginForeignKey) that references the primary key field in the origin object class (the OriginPrimaryKey). In this case, the OriginPrimaryKey, the OriginForeignKey, and the destPrimaryKey must be supplied.

The Fields object passed to the relAttrFields parameter should not be an object retrieved from another class. If the new class is going to have the same fields as an existing class, cast the existing class' fields collection to the IClone interface, clone it, and use the cloned fields collection as input for this method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createRelationshipClass in interface IFeatureWorkspace
Parameters:
relClassName - The relClassName (in)
originClass - A reference to a com.esri.arcgis.geodatabase.IObjectClass (in)
destinationClass - A reference to a com.esri.arcgis.geodatabase.IObjectClass (in)
forwardLabel - The forwardLabel (in)
backwardLabel - The backwardLabel (in)
cardinality - A com.esri.arcgis.geodatabase.esriRelCardinality constant (in)
notification - A com.esri.arcgis.geodatabase.esriRelNotification constant (in)
isComposite - The isComposite (in)
isAttributed - The isAttributed (in)
relAttrFields - A reference to a com.esri.arcgis.geodatabase.IFields (in)
originPrimaryKey - The originPrimaryKey (in)
destPrimaryKey - The destPrimaryKey (in)
originForeignKey - The originForeignKey (in)
destForeignKey - The destForeignKey (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRelationshipClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openRelationshipQuery

public ITable openRelationshipQuery(IRelationshipClass relClass,
                                    boolean joinForward,
                                    IQueryFilter srcQueryFilter,
                                    ISelectionSet srcSelectionSet,
                                    String targetColumns,
                                    boolean doNotPushJoinToDB)
                             throws IOException,
                                    AutomationException
The table of a relationship join query.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
openRelationshipQuery in interface IFeatureWorkspace
Parameters:
relClass - A reference to a com.esri.arcgis.geodatabase.IRelationshipClass (in)
joinForward - The joinForward (in)
srcQueryFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
srcSelectionSet - A reference to a com.esri.arcgis.geodatabase.ISelectionSet (in)
targetColumns - The targetColumns (in)
doNotPushJoinToDB - The doNotPushJoinToDB (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ITable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConfigurationKeywords

public IEnumConfigurationKeyword getConfigurationKeywords()
                                                   throws IOException,
                                                          AutomationException
The available configuration keywords.

Remarks

Returns an enumeration of all the of the configuration keywords for an ArcSDE or File geodatabase workspace.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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