|
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.SQL
|
+--com.jdc.rdb.sql.dml.DML
|
+--com.jdc.rdb.sql.dml.select.Select
Select represents a Data Manipulation Language Select
SQL statement.
Rows,
Columns,
From,
Correlation,
Where,
GroupBy,
Having,
OrderBy,
With,
Serialized Form| Nested Class Summary | |
class |
Select.Status
Status is the SQL status class for a database structured query language (SQL) data manipulation language (DML) Select statement object. |
| Field Summary | |
static String |
COMMAND
The Select statement command keyword. |
| Fields inherited from class com.jdc.rdb.sql.dml.DML |
sql |
| Fields inherited from class com.jdc.lang.Object |
string |
| Constructor Summary | |
Select()
Constructs a new Select statement object. |
|
Select(Table table)
Constructs a new Select statement object for the specified
Database Table. |
|
| Method Summary | |
SelectStatus |
execute()
Executes the Select statement and returns
an SelectStatus object. |
SQLStatus |
execute(boolean displayMessages)
Executes the requested SQL SELECT statement. |
Columns |
getColumns()
Returns the Columns clause for this
Select statement. |
From |
getFrom()
Returns the From clause for this Select statement. |
GroupBy |
getGroupBy()
Returns the GroupBy clause for this Select statement. |
Having |
getHaving()
Returns the Having clause for this Select statement. |
OrderBy |
getOrderBy()
Returns the OrderBy clause for this Select statement. |
Rows |
getRows()
Returns the Rows clause for this
Select statement. |
Where |
getWhere()
Returns the Where clause for this Select statement. |
protected boolean |
isValid()
Returns true if the Select statement is valid. |
Select |
set(SelectClause clause)
Sets a SelectClause for this Select statement. |
Select |
setAll()
Adds the optional ALL keyword to the Select
statement. |
Select |
setColumn(Column column)
Adds a table Column name to select. |
Select |
setDistinct()
Adds the optional DISTINCT keyword to the Select
statement. |
Select |
setGroupBy(Column column)
Adds a table Column name to group by. |
Select |
setOrderBy(Column column)
Adds a table Column name to order by plus the sort order. |
Select |
setOrderBy(Column column,
Order order)
Adds a table Column name to order by plus the sort order. |
Select |
setWhere(Column column,
Comparison comparison,
int value)
Sets a search condition for the specified table Column,
Comparison operator, and int value. |
Select |
setWhere(Column column,
Comparison comparison,
Object value)
Sets a search condition for the specified table Column,
Comparison operator, and Object value. |
Select |
setWhere(Column column,
int value)
Sets a search condition for the specified table Column
and int value. |
Select |
setWhere(Column column,
Object value)
Sets a search condition for the specified table Column
and Object value. |
| Methods inherited from class com.jdc.rdb.sql.dml.DML |
finalize, getColumn, getConnection, getTable, setTable |
| Methods inherited from class com.jdc.rdb.sql.SQL |
addClause, getClause, getCommand, getStatement, setCommand, setConnection, setStatement, toString |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String COMMAND
Select statement command keyword.
| Constructor Detail |
public Select()
Select statement object.
public Select(Table table)
Select statement object for the specified
Database Table.
SQLInvalidException - No table definition is specified.| Method Detail |
public SelectStatus execute()
Select statement and returns
an SelectStatus object.
Select statement status.public SQLStatus execute(boolean displayMessages)
execute in class SQLpublic Columns getColumns()
Columns clause for this
Select statement.
Select statement Columns clause.public From getFrom()
From clause for this Select statement.
Select statement From clause.public GroupBy getGroupBy()
GroupBy clause for this Select statement.
Select statement GroupBy clause.public Having getHaving()
Having clause for this Select statement.
Select statement Having clause.public OrderBy getOrderBy()
OrderBy clause for this Select statement.
Select statement OrderBy clause.public Rows getRows()
Rows clause for this
Select statement.
Select statement Rows clause.public Where getWhere()
Where clause for this Select statement.
Select statement Where clause.protected boolean isValid()
isValid in class SQLTrue if the SQL statement is valid. False if the SQL statement is not validpublic Select set(SelectClause clause)
SelectClause for this Select statement. Use
this method to specify a custom Select clause.
Select statement object.
SQLInvalidException - No SELECT statement clause is specified.public Select setAll()
ALL keyword to the Select
statement. This keyword retains all rows of the final result table and does
not eliminate (redundant) duplicates. This is the default.
Select statement object.setDistinctpublic Select setColumn(Column column)
Column name to select. These values are
used to create the Columns clause for this statement.
Select statement object.
SQLInvalidException - No column is specified or an invalid
table column is specified.public Select setDistinct()
DISTINCT keyword to the Select
statement. This keyword eliminates all but one of each set of duplicate
rows of the final result table.
Two rows are duplicates of one another only if each value in the first is
equal to the corresponding value of the second. For determining duplicates,
two null values are considered equal.
Select statement object.setAllpublic Select setGroupBy(Column column)
Column name to group by. These values are
used to create the GroupBy clause for this statement.
Select statement object.
SQLInvalidException - No column is specified or an invalid
table column is specified.public Select setOrderBy(Column column)
Column name to order by plus the sort order.
These values are used to create the OrderBy clause for this statement.
A sort Order of ASCENDING is implied.
Select statement object.
SQLInvalidException - No column is specified or an invalid
table column is specified.
public Select setOrderBy(Column column,
Order order)
Column name to order by plus the sort order.
These values are used to create the OrderBy clause for this statement.
A Comparison operator of EQUAL,
i.e. "=", is implied.
Select statement object.
SQLInvalidException - No column is specified or an invalid
table column is specified.
public Select setWhere(Column column,
int value)
Column
and int value. These values are used to create the Where
clause for this statement. A Comparison operator of EQUAL,
i.e. "=", is implied.
Select statement object.
SQLInvalidException - No column is specified or an invalid
table column is specified.
public Select setWhere(Column column,
Object value)
Column
and Object value. These values are used to create the Where
clause for this statement. A Comparison operator of EQUAL,
i.e. "=", is implied.
Select statement object.
SQLInvalidException - No column is specified or an invalid
table column is specified.
public Select setWhere(Column column,
Comparison comparison,
int value)
Column,
Comparison operator, and int value. These values are
used to create the Where clause for this statement. Refer to the
Comparison operator class for a list of valid comparison operators.
Select statement object.
SQLInvalidException - No column is specified or an invalid
table column is specified.
public Select setWhere(Column column,
Comparison comparison,
Object value)
Column,
Comparison operator, and Object value. These
values are used to create the Where clause for this statement.
Refer to the Comparison operator class for a list of valid comparison
operators.
Select statement object.
SQLInvalidException - No column is specified or an invalid
table column is specified.
|
2004.04.29 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||