com.esri.arcgis.geodatabase
Class TableSort

java.lang.Object
  extended by com.esri.arcgis.geodatabase.TableSort
All Implemented Interfaces:
ITableSort, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class TableSort
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ITableSort

ESRI Table Sort object.

Remarks

The TableSort class allows control over the order in which rows are returned from a table or feature class. To use TableSort, an instance of the class is first created, then properties are set to specify the data and the sort options and finally a method is executed to perform the sort. Once this is done, you can open a cursor or retrieve a sorted list of row IDs.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
TableSort()
          Constructs a TableSort using ArcGIS Engine.
TableSort(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
TableSort theTableSort = (TableSort) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int getIDByIndex(int index)
          A id by its index value.
 IEnumIDs getIDs()
          List of sorted IDs.
 IQueryFilter getQueryFilter()
          The query filter on table or selection set.
 ICursor getRows()
          Cursor of sorted rows.
 ISelectionSet getSelectionSet()
          The selection set as a source of the data to sort on.
 ITable getTable()
          The table as a source of the data to sort on.
 int hashCode()
          the hashcode for this object
 void setAscending(String field, boolean rhs2)
          Field sort order.
 void setCaseSensitive(String field, boolean rhs2)
          Character fields case sensitive.
 void setCompareByRef(ITableSortCallBack rhs1)
          Compare call back interface.
 void setCursorByRef(ICursor rhs1)
          The cursor of the data to sort on.
 void setFields(String rhs1)
          Comma list of field names to sort on.
 void setQueryFilterByRef(IQueryFilter queryFilter)
          The query filter on table or selection set.
 void setSelectionSetByRef(ISelectionSet selectionSet)
          The selection set as a source of the data to sort on.
 void setSortCharacters(String field, int rhs2)
          Number of characters to sort on, for string fields.
 void setTableByRef(ITable table)
          The table as a source of the data to sort on.
 void sort(ITrackCancel trackCancel)
          Sort rows.
 
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

TableSort

public TableSort()
          throws IOException,
                 UnknownHostException
Constructs a TableSort using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

TableSort

public TableSort(Object obj)
          throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
TableSort theTableSort = (TableSort) obj;

Construct a TableSort using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to TableSort.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


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

setTableByRef

public void setTableByRef(ITable table)
                   throws IOException,
                          AutomationException
The table as a source of the data to sort on.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setSelectionSetByRef

public void setSelectionSetByRef(ISelectionSet selectionSet)
                          throws IOException,
                                 AutomationException
The selection set as a source of the data to sort on. Cancels Cursor.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSelectionSetByRef in interface ITableSort
Parameters:
selectionSet - A reference to a com.esri.arcgis.geodatabase.ISelectionSet (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCursorByRef

public void setCursorByRef(ICursor rhs1)
                    throws IOException,
                           AutomationException
The cursor of the data to sort on. Ensure that sorting fields are available. Cancels SelectionSet.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setQueryFilterByRef

public void setQueryFilterByRef(IQueryFilter queryFilter)
                         throws IOException,
                                AutomationException
The query filter on table or selection set.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setQueryFilterByRef in interface ITableSort
Parameters:
queryFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getQueryFilter

public IQueryFilter getQueryFilter()
                            throws IOException,
                                   AutomationException
The query filter on table or selection set.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setFields

public void setFields(String rhs1)
               throws IOException,
                      AutomationException
Comma list of field names to sort on.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setAscending

public void setAscending(String field,
                         boolean rhs2)
                  throws IOException,
                         AutomationException
Field sort order.

Product Availability

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

Specified by:
setAscending in interface ITableSort
Parameters:
field - The field (in)
rhs2 - The rhs2 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSortCharacters

public void setSortCharacters(String field,
                              int rhs2)
                       throws IOException,
                              AutomationException
Number of characters to sort on, for string fields. A null (default) sorts on the whole string.

Product Availability

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

Specified by:
setSortCharacters in interface ITableSort
Parameters:
field - The field (in)
rhs2 - The rhs2 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCaseSensitive

public void setCaseSensitive(String field,
                             boolean rhs2)
                      throws IOException,
                             AutomationException
Character fields case sensitive. Default: False.

Product Availability

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

Specified by:
setCaseSensitive in interface ITableSort
Parameters:
field - The field (in)
rhs2 - The rhs2 (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCompareByRef

public void setCompareByRef(ITableSortCallBack rhs1)
                     throws IOException,
                            AutomationException
Compare call back interface. Specify Null (default) for normal behavior.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setCompareByRef in interface ITableSort
Parameters:
rhs1 - A reference to a com.esri.arcgis.geodatabase.ITableSortCallBack (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIDs

public IEnumIDs getIDs()
                throws IOException,
                       AutomationException
List of sorted IDs.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getRows

public ICursor getRows()
                throws IOException,
                       AutomationException
Cursor of sorted rows.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getRows in interface ITableSort
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.

sort

public void sort(ITrackCancel trackCancel)
          throws IOException,
                 AutomationException
Sort rows.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
sort in interface ITableSort
Parameters:
trackCancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIDByIndex

public int getIDByIndex(int index)
                 throws IOException,
                        AutomationException
A id by its index value.

Product Availability

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

Specified by:
getIDByIndex in interface ITableSort
Parameters:
index - The index (in)
Returns:
The idVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTable

public ITable getTable()
                throws IOException,
                       AutomationException
The table as a source of the data to sort on.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTable in interface ITableSort
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.

getSelectionSet

public ISelectionSet getSelectionSet()
                              throws IOException,
                                     AutomationException
The selection set as a source of the data to sort on. Cancels Cursor.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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