|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jaxme.sqls.impl.StatementImpl net.sf.jaxme.sqls.impl.ConstrainedStatementImpl net.sf.jaxme.sqls.impl.SelectStatementImpl
Nested Class Summary | |
static class |
SelectStatementImpl.OrderColumnImpl
|
Nested classes inherited from class net.sf.jaxme.sqls.SelectStatement |
SelectStatement.OrderColumn |
Constructor Summary | |
SelectStatementImpl(SQLFactory pFactory)
Creates a new SelectStatement and sets the creating SQLFactory . |
Method Summary | |
void |
addOrderColumn(ColumnReference pColumn)
Adds a column to the ORDER BY clause. |
void |
addOrderColumn(ColumnReference pColumn,
boolean pDescending)
Adds a column to the ORDER BY clause. |
void |
addOrderColumn(SelectStatement.OrderColumn pColumn)
Adds a column to the ORDER BY clause. |
void |
addResultColumn(ColumnReference pColumn)
Adds a result column to the statement. |
int |
getMaxRows()
Returns the limit of the number of rows in the result set, or zero, if the size of the result set is unlimited. |
java.util.Iterator |
getResultColumns()
Returns the list of result columns. |
SelectTableReference |
getSelectTableReference()
Shortcut for (SelectTableReference) getTable() . |
java.util.Iterator |
getSelectTableReferences()
Returns an Iterator over all the table references. |
int |
getSkippedRows()
Returns the number of rows to skip at the result sets beginning. |
boolean |
isDistinct()
Returns whether the statement should have a DISTINCT clause. |
protected TableReference |
newTableReference(Table pTable)
|
void |
setDistinct(boolean pDistinct)
Sets whether the statement should have a DISTINCT clause. |
void |
setMaxRows(int pMaxRows)
Limits the size of the result set to the given number of rows. |
void |
setSkippedRows(int pSkippedRows)
Indicates that the given number of rows should be skipped at the result sets beginning. |
Methods inherited from class net.sf.jaxme.sqls.impl.ConstrainedStatementImpl |
getWhere |
Methods inherited from class net.sf.jaxme.sqls.impl.StatementImpl |
getSQLFactory, getTableReference, setTable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.jaxme.sqls.ConstrainedStatement |
getWhere |
Methods inherited from interface net.sf.jaxme.sqls.Statement |
getSQLFactory, getTableReference, setTable |
Constructor Detail |
public SelectStatementImpl(SQLFactory pFactory)
Creates a new SelectStatement and sets the creating
SQLFactory
.
Method Detail |
public void addOrderColumn(ColumnReference pColumn)
SelectStatement
Adds a column to the ORDER BY clause. The column is sorted in ascending order.
addOrderColumn
in interface SelectStatement
public void addOrderColumn(ColumnReference pColumn, boolean pDescending)
SelectStatement
Adds a column to the ORDER BY clause. The column is sorted in
ascending or descending order, depending on the parameter
pDescending
.
addOrderColumn
in interface SelectStatement
pDescending
- True for descending or false for ascendingpublic void addOrderColumn(SelectStatement.OrderColumn pColumn)
SelectStatement
Adds a column to the ORDER BY clause.
addOrderColumn
in interface SelectStatement
public void addResultColumn(ColumnReference pColumn)
SelectStatement
Adds a result column to the statement. By default all columns are returned.
addResultColumn
in interface SelectStatement
public java.util.Iterator getResultColumns()
SelectStatement
Returns the list of result columns.
getResultColumns
in interface SelectStatement
public void setDistinct(boolean pDistinct)
SelectStatement
Sets whether the statement should have a DISTINCT clause. By default no DISTINCT clause is present.
setDistinct
in interface SelectStatement
public boolean isDistinct()
SelectStatement
Returns whether the statement should have a DISTINCT clause. By default no DISTINCT clause is present.
isDistinct
in interface SelectStatement
public void setMaxRows(int pMaxRows)
SelectStatement
Limits the size of the result set to the given number of rows. Defaults to zero, in which case the size of the result set is unlimited.
setMaxRows
in interface SelectStatement
public int getMaxRows()
SelectStatement
Returns the limit of the number of rows in the result set, or zero, if the size of the result set is unlimited.
getMaxRows
in interface SelectStatement
public void setSkippedRows(int pSkippedRows)
SelectStatement
Indicates that the given number of rows should be skipped at the result sets beginning. The default is zero, in which case no rows are skipped.
setSkippedRows
in interface SelectStatement
public int getSkippedRows()
SelectStatement
Returns the number of rows to skip at the result sets beginning. The default is zero, in which case no rows are skipped.
getSkippedRows
in interface SelectStatement
protected TableReference newTableReference(Table pTable)
newTableReference
in class StatementImpl
public SelectTableReference getSelectTableReference()
SelectStatement
Shortcut for (SelectTableReference) getTable()
.
getSelectTableReference
in interface SelectStatement
public java.util.Iterator getSelectTableReferences()
SelectStatement
Returns an Iterator over all the table references.
getSelectTableReferences
in interface SelectStatement
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |