|
2004.04.29 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.jdc.lang.Object
|
+--com.jdc.rdb.sql.SQLClause
|
+--com.jdc.rdb.sql.dml.DMLClause
|
+--com.jdc.rdb.sql.dml.select.OrderBy
OrderBy represents a Select
SQL statement ORDER BY clause. The ORDER BY
clause specifies specifies an ordering of the rows of the result Table.
If a single sort specification (one sort-key with associated
direction) is identified, the rows are ordered by the values of that sort
specification. If more than one sort specification is identified, the rows are
ordered by the values of the first identified sort specification, then by the
values of the second identified sort specification, and so on.
null
value is higher than all other values. If the ORDER BY clause does
not completely order the rows, rows with duplicate values of all identified
columns are displayed in an arbitrary order.
Valid column sort orders are:
ASC - Sort the values of the column in ascending order. This is the default.DESC - Sort the values of the column in descending order.Order class for a list of valid sort orders.
SELECT statement specifies DISTINCT in the select clause.
Select,
Order,
Serialized Form| Field Summary |
| Fields inherited from class com.jdc.rdb.sql.dml.DMLClause |
sqlClause |
| Fields inherited from class com.jdc.lang.Object |
string |
| Constructor Summary | |
OrderBy()
Constructs a new OrderBy clause object. |
|
OrderBy(String value)
Constructs a new OrderBy clause object for the specified
column name or names. |
|
| Method Summary | |
OrderBy |
addName(String column)
Adds a Column name to the list of Column names. |
OrderBy |
addName(String table,
String column)
Adds a Table Column name to the list of
Column names. |
OrderBy |
addName(String table,
String column,
String order)
Adds a Table Column name and sort order
to the list of Column names. |
boolean |
contains(String table,
String column)
Returns true if the OrderBy list contains the
specified Table Column name. |
String |
getKeyword()
Returns the OrderBy clause keyword. |
String |
getValue()
Returns the OrderBy clause value. |
String |
toString()
Returns a String representation of this OrderBy clause. |
| Methods inherited from class com.jdc.rdb.sql.dml.DMLClause |
getKeyword |
| Methods inherited from class com.jdc.rdb.sql.SQLClause |
contains, setKeyword, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public OrderBy()
OrderBy clause object.
public OrderBy(String value)
OrderBy clause object for the specified
column name or names.
SQLInvalidException - No ORDER BY column name or names is specified.| Method Detail |
public OrderBy addName(String column)
Column name to the list of Column names.
The list of Column names is used to create the OrderBy
clause value. Invoke this method as many times as is required to create a
list of Column names.
OrderBy clause object.
SQLInvalidException - No Column name is specified or
the column name is already specified.addName(String, String)
public OrderBy addName(String table,
String column)
Table Column name to the list of
Column names. The list of Column names is used to
create the OrderBy clause value. Invoke this method as many
times as is required to create a list of Table Column
names.
OrderBy clause object.
SQLInvalidException - No Table Column name
is specified or the column name is already specified.addName(String, String, String)
public OrderBy addName(String table,
String column,
String order)
Table Column name and sort order
to the list of Column names. The list of Column names
is used to create the OrderBy clause value. Invoke this method
as many times as is required to create a list of Table
Column names.
OrderBy clause object.
SQLInvalidException - No Table Column name
is specified, the column name is already specified, or the
sort order is not valid.addName(String)
public boolean contains(String table,
String column)
true if the OrderBy list contains the
specified Table Column name.
True if the list contains the Column name. False if the list does not contain the Column name.public String getKeyword()
OrderBy clause keyword.
getKeyword in class SQLClauseOrderBy clause keyword.public String getValue()
OrderBy clause value.
getValue in class SQLClauseOrderBy clause value.public String toString()
String representation of this OrderBy clause.
toString in interface SelectClausetoString in class SQLClauseString representation of this OrderBy clause.
|
2004.04.29 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||