| java.lang.Object workbench.storage.SortDefinition
SortDefinition | public class SortDefinition (Code) | | A class to store the sort definition of a result set (e.g. DataStore,
DatastoreTableModel)
author: support@sql-workbench.net |
SortDefinition | public SortDefinition()(Code) | | |
SortDefinition | public SortDefinition(int column, boolean ascending)(Code) | | |
SortDefinition | public SortDefinition(int[] columns, boolean[] ascending)(Code) | | |
addSortColumn | public void addSortColumn(int column, boolean ascending)(Code) | | Add a column to the list of sort columns.
If sort columns exist, the new column is added at the end, otherwise
the column will be the primary sort column.
Parameters: column - the column index (inside the result set) to be added Parameters: ascending - true if sorting should be ascending |
createCopy | public SortDefinition createCopy()(Code) | | Create a copy of this sort definition.
a new SortDefinition with the same settings as this |
getColumnCount | public int getColumnCount()(Code) | | Returns the numer of sort columns defined.
the count of sort columns |
getSortColumnByIndex | public int getSortColumnByIndex(int definitionIndex) throws ArrayIndexOutOfBoundsException(Code) | | Return the column index from the result set based on the
index in the column list (the primary sort column has
index 0)
Parameters: definitionIndex - the index in the list of columns the column index in the result set or -1 if no sort columns are defined |
hasColumns | public boolean hasColumns()(Code) | | |
hashCode | public int hashCode()(Code) | | |
isPrimarySortColumn | public boolean isPrimarySortColumn(int col)(Code) | | Check if the given column is the first column in the sort definition
Parameters: col - the column index in the result set true if the column was found and if it's the first column |
isSortAscending | public boolean isSortAscending(int col)(Code) | | Return true if the data is sorted in ascending order for the given column.
Parameters: col - the column index in the result set True if sorted in ascending order |
removeSortColumn | public void removeSortColumn(int column)(Code) | | Remove the specified sort column from this definition.
If the column is not found, nothing is changed.
Parameters: column - the column index in the result set |
setSortColumn | public void setSortColumn(int column, boolean ascending)(Code) | | Define a single column as the sort column.
If sort columns exist, they are reqplaced with the given column
Parameters: column - the column index (inside the result set) to be set Parameters: ascending - true if sorting should be ascending |
|
|