com.esri.arcgis.geodatabase
Class IQueryDefProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.IQueryDefProxy
All Implemented Interfaces:
IQueryDef, Externalizable, Serializable
Direct Known Subclasses:
IQueryDef2Proxy

public class IQueryDefProxy
extends com.esri.arcgis.interop.Dispatch
implements IQueryDef, Serializable

Provides access to members that control attribute based queries.

Description

IQueryDef sets the parameters needed to create an attribute query. The name of the table and a string defining the where clause are required. An optional list of columns may be included to specify the columns to be retrieved. If no columns are specified, all columns will be returned.

IQueryDef only can be used with ArcSDE, Personal and File Geodatabase data sources.

Remarks

The IQueryDef interface allows the definition of an attribute query based on one or more tables. Multiple table joins may be defined through the use of this interface.

In order to access the geometry of a feature returned by the query the shape field must be included in the SubFields definition.

If multiple feature classes are specified in the IQueryDef.Tables property it is the application developer's responsibility to ensure that only one shape attribute is specified in the IQueryDef.SubFields property.

Product Availability

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

See Also:
IQueryFilter, 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
  IQueryDefProxy()
           
  IQueryDefProxy(Object obj)
           
protected IQueryDefProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 ICursor evaluate()
          Evaluate the query and return a cursor on the result set.
 String getSubFields()
          The comma delimited list of field names for the query.
 String getTables()
          The comma delimited list of table names for the query.
 String getWhereClause()
          The where clause for the query.
 void removeListener(String iidStr, Object theListener)
           
 void setSubFields(String subFields)
          The comma delimited list of field names for the query.
 void setTables(String tables)
          The comma delimited list of table names for the query.
 void setWhereClause(String whereClause)
          The where clause for the query.
 
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

IQueryDefProxy

public IQueryDefProxy()

IQueryDefProxy

public IQueryDefProxy(Object obj)
               throws IOException
Throws:
IOException

IQueryDefProxy

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

getTables

public String getTables()
                 throws IOException,
                        AutomationException
The comma delimited list of table names for the query.

Description

Get or put a comma delimited string of tables for use in the query from the Tables data member.

Remarks

Returns a string containing the name of a single table (or a list of table names when used in a join). When used with an ArcSDE datasource, the table name will be prefixed with the owner name (owner.mytable) if the table is not owned by the current workspace.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setTables

public void setTables(String tables)
               throws IOException,
                      AutomationException
The comma delimited list of table names for the query.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getSubFields

public String getSubFields()
                    throws IOException,
                           AutomationException
The comma delimited list of field names for the query.

Description

SubFields returns or sets a comma delimited list of fields.

Remarks

The following formats are used for the SubFields property of a QueryDef against an ArcSDE datasource:

Format 1: "*"
This returns all fields on all tables. If duplicate column names are found, the field names will be prefixed with the table name (table.field_name).

Format 2: "field1,field2,field3"
Returns only the fields requested. (Separate field names by commas but do not add a space after or before the comma)

Format 3: "table1.*,table2.field1,table3.field2"
Returns all of the fields from table1, field1 from table2 and field 2 from table3.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setSubFields

public void setSubFields(String subFields)
                  throws IOException,
                         AutomationException
The comma delimited list of field names for the query.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getWhereClause

public String getWhereClause()
                      throws IOException,
                             AutomationException
The where clause for the query.

Remarks

For more information about where clauses, see IQueryFilter.WhereClause.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setWhereClause

public void setWhereClause(String whereClause)
                    throws IOException,
                           AutomationException
The where clause for the query.

Remarks

For more information about where clauses, see IQueryFilter.WhereClause.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

evaluate

public ICursor evaluate()
                 throws IOException,
                        AutomationException
Evaluate the query and return a cursor on the result set.

Remarks

The IQueryDef interface is used to set up and define the query and also provides an Evaluate method that is used to execute the query, returning a cursor.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
evaluate in interface IQueryDef
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.