|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface provides a representation of the ordering of rows in a ResultSet.
Field Summary | |
static int |
ASCENDING
|
static int |
DESCENDING
|
static int |
DONTCARE
|
Method Summary | |
void |
addOrderedColumn(int direction,
int tableNumber,
int columnNumber)
Add a column to this RowOrdering in the current order position. |
void |
addUnorderedOptimizable(Optimizable optimizable)
Add an unordered optimizable to this RowOrdering. |
boolean |
alwaysOrdered(int tableNumber)
Ask whether the given table is always ordered. |
void |
columnAlwaysOrdered(Optimizable optimizable,
int columnNumber)
Tell this RowOrdering that it is always ordered on the given column of the given optimizable. |
void |
copy(RowOrdering copyTo)
Copy the contents of this RowOrdering to the given RowOrdering. |
void |
nextOrderPosition(int direction)
Move to the next order position for adding ordered columns. |
void |
optimizableAlwaysOrdered(Optimizable optimizable)
Tell this RowOrdering that it is always ordered on the given optimizable This is useful when considering a unique index where there is an equality match on the entire key - in this case, all the columns are ordered, regardless of the direction or position, or even whether the columns are in the index. |
boolean |
orderedOnColumn(int direction,
int tableNumber,
int columnNumber)
Tell whether this ordering is ordered on the given column. |
boolean |
orderedOnColumn(int direction,
int orderPosition,
int tableNumber,
int columnNumber)
Tell whether this ordering is ordered on the given column in the given position |
void |
removeOptimizable(int tableNumber)
Tell this row ordering that it is no longer ordered on the given table. |
Field Detail |
public static final int ASCENDING
public static final int DESCENDING
public static final int DONTCARE
Method Detail |
public boolean orderedOnColumn(int direction, int orderPosition, int tableNumber, int columnNumber) throws StandardException
direction
- One of ASCENDING, DESCENDING, or DONTCARE
depending on the requirements of the caller.
An ORDER BY clause cares about direction,
while DISTINCT and GROUP BY do not.orderPosition
- The position in the ordering list. For example,
for ORDER BY A, B, position 0 has column A,
and position 1 has column B. Note that for an
ordering, more than one column can be in a single
ordering position: for example, in the query
SELECT * FROM S, T WHERE S.A = T.B ORDER BY T.B
columns S.A and T.B will be in the same ordering
positions because they are equal. Also, constant
values are considered ordered in all positions
(consider SELECT A FROM T WHERE A = 1 ORDER BY A).tableNumber
- The table number of the Optimizable containing
the column in questioncolumnNumber
- The column number in the table (one-based).
StandardException
- Thrown on errorpublic boolean orderedOnColumn(int direction, int tableNumber, int columnNumber) throws StandardException
direction
- One of ASCENDING, DESCENDING, or DONTCARE
depending on the requirements of the caller.
An ORDER BY clause cares about direction,
while DISTINCT and GROUP BY do not.tableNumber
- The table number of the Optimizable containing
the column in questioncolumnNumber
- The column number in the table (one-based).
StandardException
- Thrown on errorpublic void addOrderedColumn(int direction, int tableNumber, int columnNumber)
direction
- One of ASCENDING, DESCENDING, or DONTCARE.
DONTCARE can be used for things like columns
with constant value, and for one-row tables.tableNumber
- The table the column is in.columnNumber
- The column number in the table (one-based)public void nextOrderPosition(int direction)
direction
- One of ASCENDING, DESCENDING, or DONTCARE.
DONTCARE can be used for things like columns
with constant value, and for one-row tables.public void optimizableAlwaysOrdered(Optimizable optimizable)
optimizable
- The table in questionpublic void columnAlwaysOrdered(Optimizable optimizable, int columnNumber)
optimizable
- The table in questioncolumnNumber
- The number of the column in question.public boolean alwaysOrdered(int tableNumber)
public void removeOptimizable(int tableNumber)
tableNumber
- The number of the table to remove from
this RowOrdering.public void addUnorderedOptimizable(Optimizable optimizable)
public void copy(RowOrdering copyTo)
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |