|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface QueryDelegate
| Nested Class Summary | |
|---|---|
static interface |
QueryDelegate.RowIdChangeEvent
An Event object specifying the old and new RowId of an added
item after the addition has been successfully committed. |
static interface |
QueryDelegate.RowIdChangeListener
RowId change listener interface. |
static interface |
QueryDelegate.RowIdChangeNotifier
The interface for adding and removing RowIdChangeEvent
listeners. |
| Method Summary | |
|---|---|
void |
beginTransaction()
Starts a new database transaction. |
void |
commit()
Commits a transaction. |
boolean |
containsRowWithKey(Object... keys)
Performs a query to find out whether the SQL table contains a row with the given set of primary keys. |
int |
getCount()
Generates and executes a query to determine the current row count from the DB. |
List<String> |
getPrimaryKeyColumns()
Returns a list of primary key column names. |
ResultSet |
getResults(int offset,
int pagelength)
Executes a paged SQL query and returns the ResultSet. |
boolean |
implementationRespectsPagingLimits()
Allows the SQLContainer implementation to check whether the QueryDelegate implementation implements paging in the getResults method. |
boolean |
removeRow(RowItem row)
Removes the given RowItem from the database. |
void |
rollback()
Rolls a transaction back. |
void |
setFilters(List<Container.Filter> filters)
Sets the filters to apply when performing the SQL query. |
void |
setOrderBy(List<OrderBy> orderBys)
Sets the order in which to retrieve rows from the database. |
int |
storeRow(RowItem row)
Stores a row in the database. |
| Method Detail |
|---|
int getCount()
throws SQLException
SQLException
ResultSet getResults(int offset,
int pagelength)
throws SQLException
offset - the first item of the page to loadpagelength - the length of the page to load
SQLException - if the database access fails.boolean implementationRespectsPagingLimits()
getResults(int, int)
void setFilters(List<Container.Filter> filters)
throws UnsupportedOperationException
filters - The filters to apply.
UnsupportedOperationException - if the implementation doesn't support filtering.
void setOrderBy(List<OrderBy> orderBys)
throws UnsupportedOperationException
orderBys - A list of the OrderBy conditions.
UnsupportedOperationException - if the implementation doesn't support ordering.
int storeRow(RowItem row)
throws UnsupportedOperationException,
SQLException
columnToValueMap - A map containing the values for all columns to be stored or
updated.
UnsupportedOperationException - if the implementation is read only.
SQLException
boolean removeRow(RowItem row)
throws UnsupportedOperationException,
SQLException
row - RowItem to be removed
UnsupportedOperationException
SQLException
void beginTransaction()
throws SQLException
SQLException - if the database access fails.
void commit()
throws SQLException
SQLException - if the database access fails.
void rollback()
throws SQLException
SQLException - if the database access fails.List<String> getPrimaryKeyColumns()
boolean containsRowWithKey(Object... keys)
throws SQLException
keys - the primary keys
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||