com.esri.arcgis.geodatabase
Class ISqlWorkspaceProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.ISqlWorkspaceProxy
All Implemented Interfaces:
ISqlWorkspace, Externalizable, Serializable

public class ISqlWorkspaceProxy
extends com.esri.arcgis.interop.Dispatch
implements ISqlWorkspace, Serializable

Query layer workspace interface

Description

This interface is used to create query classes and query cursors, and to retrieve information about SQL workspaces.

Remarks

A SQL workspace is a relational database that may or may not be a geodatabase. After creating a workspace with the SqlWorkspaceFactory class (and the IWorkspaceFactory interface), this interface is used to retrieve data in a read-only manner as query classes and query cursors. Query classes can be used much like tables or feature classes from other data sources; through ArcMap, they are exposed as "Query Layers".

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
  ISqlWorkspaceProxy()
           
  ISqlWorkspaceProxy(Object obj)
           
protected ISqlWorkspaceProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void checkDatasetName(String name, IQueryDescription pQueryDescription, String[] pNewName)
          Returns unique name in the workspace.
 void getColumns(String tableName, IStringArray[] ppColumnName, IStringArray[] ppColumnType, IVariantArray[] ppIsNullable, ILongArray[] ppSize, ILongArray[] ppPrecision, ILongArray[] ppScale)
          Returns column information for a table.
 IQueryDescription getQueryDescription(String query)
          Get query properties including spatial based on the first record of the query.
 IStringArray getTables()
          Returns names of all the table.
 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.
 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

ISqlWorkspaceProxy

public ISqlWorkspaceProxy()

ISqlWorkspaceProxy

public ISqlWorkspaceProxy(Object obj)
                   throws IOException
Throws:
IOException

ISqlWorkspaceProxy

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

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.