| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.datatools.connectivity.oda.SortSpec
public class SortSpec
A class that encapsulates one or more sort keys for 
 association with an IQuery.  
 The class is designed to be extendable to accommodate 
 additional ways of expressing a sort mode or key.
 
Note: This class will be deprecated in the release after DTP 1.7, 
 being replaced by 
 SortSpecification.
| Field Summary | |
|---|---|
| static int | sortAscThe constant indicating ascending sort order. | 
| static int | sortDescThe constant indicating descending sort order. | 
| Constructor Summary | |
|---|---|
| SortSpec(int sortMode)Instantiates a SortSpecobject for the definedsortMode. | |
| Method Summary | |
|---|---|
|  void | addSortKey(java.lang.String columnName,
           int sortOrder)Specifies the dynamic sort criteria in this sort mode. | 
|  java.lang.String | getSortColumn(int index)Returns the result set column name of the sort key at the indexposition. | 
|  java.lang.String[] | getSortColumns()Returns an array of all column names for the sort key of a sortModeSingleOrderSortSpecobject. | 
|  int | getSortKeyCount()Returns the number of sort keys associated with this SortSpecobject. | 
|  int | getSortMode()Returns the sort mode of this SortSpecobject. | 
|  int | getSortOrder()Returns the sort order for the sort keys of a sortModeSingleOrderSortSpecobject. | 
|  int | getSortOrder(int index)Returns the sort order of the sort key at the indexposition. | 
|  void | setLocale(com.ibm.icu.util.ULocale locale)Deprecated. obsolete; migrated to use NLS Messages class | 
|  java.lang.String | toString()Returns a string representation of this SortSpec. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final int sortAsc
public static final int sortDesc
| Constructor Detail | 
|---|
public SortSpec(int sortMode)
SortSpec object for the defined
 sortMode.
sortMode - the sort mode of this SortSpec; one of 
                                        IDataSetMetaData.sortModeNone, 
                                        IDataSetMetaData.sortModeSingleOrder,
                                        IDataSetMetaData.sortModeColumnOrder,
                                        IDataSetMetaData.sortModeSingleColumn.
java.lang.IllegalArgumentException - if the sortMode is not a 
                                                                        valid value.| Method Detail | 
|---|
public void addSortKey(java.lang.String columnName,
                       int sortOrder)
SortSpec's sortMode; 
 i.e. the method throws an exception when adding a sort key that does not
 conform to the sortMode of this SortSpec object.
columnName - name of the result set column to apply dynamic sorting
                                                on.  The specified column should be one of the columns
                                                retrieved in a result set.sortOrder - value that represents the sorting order; one of 
                                                sortAsc, sortDesc.
java.lang.NullPointerException - if columnName is null.
java.lang.IllegalArgumentException - if columnName is empty; or if 
                                                                        sortOrder is not sortAsc 
                                                                        or sortDesc.
java.lang.IllegalStateException - if the sortMode of this SortSpec 
                                                                        is IDataSetMetaData.sortModeNone; 
                                                                        or if the sortMode of this SortSpec 
                                                                        is IDataSetMetaData.sortModeSingleColumn, 
                                                                        and a sort key is already associated; or if the
                                                                        sortMode of this SortSpec is 
                                                                        IDataSetMetaData.sortModeSingleOrder 
                                                                        and the sort order does not match existing sort orders.public int getSortMode()
SortSpec object.
SortSpec; one of 
                        IDataSetMetaData.sortModeNone, 
                        IDataSetMetaData.sortModeSingleOrder,
                        IDataSetMetaData.sortModeColumnOrder,
                        IDataSetMetaData.sortModeSingleColumn.public int getSortKeyCount()
SortSpec 
 object.
SortSpec object.public java.lang.String getSortColumn(int index)
index 
 position.
index - index of the sort key (1-based).
java.lang.IndexOutOfBoundsException - if index is out of range 
                                        (index < 1 || index > getSortKeyCount()).public int getSortOrder(int index)
index position.
index - index of the sort key (1-based).
java.lang.IndexOutOfBoundsException - if index is out of range 
                                        (index < 1 || index > getSortKeyCount()).public java.lang.String[] getSortColumns()
sortModeSingleOrder SortSpec object.
sortModeSingleOrder SortSpec 
                        object; an empty array if no sort keys are associated 
                        with this SortSpec.
java.lang.IllegalStateException - if this SortSpec's sort 
                                                                        mode is not sortModeSingleOrder.public int getSortOrder()
sortModeSingleOrder
 SortSpec object.
sortModeSingleOrder 
                        SortSpec object; the default value, sortAsc, 
                        if no sort keys are associated with this SortSpec.
java.lang.IllegalStateException - if this SortSpec's sort 
                                                                        mode is not sortModeSingleOrder.public void setLocale(com.ibm.icu.util.ULocale locale)
SortSpec. Enables this SortSpec 
 to return localized error messages. The default locale is en_US.
locale - the locale used for localizing error messages.public java.lang.String toString()
SortSpec.
toString in class java.lang.ObjectSortSpec.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||