|
||||||||||
| 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(java.lang.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. |
java.util.List<java.lang.String> |
getPrimaryKeyColumns()
Returns a list of primary key column names. |
java.sql.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(java.util.List<Container.Filter> filters)
Sets the filters to apply when performing the SQL query. |
void |
setOrderBy(java.util.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 java.sql.SQLException
java.sql.SQLException
java.sql.ResultSet getResults(int offset,
int pagelength)
throws java.sql.SQLException
offset - the first item of the page to loadpagelength - the length of the page to load
java.sql.SQLException - if the database access fails.boolean implementationRespectsPagingLimits()
getResults(int, int)
void setFilters(java.util.List<Container.Filter> filters)
throws java.lang.UnsupportedOperationException
filters - The filters to apply.
java.lang.UnsupportedOperationException - if the implementation doesn't support filtering.
void setOrderBy(java.util.List<OrderBy> orderBys)
throws java.lang.UnsupportedOperationException
orderBys - A list of the OrderBy conditions.
java.lang.UnsupportedOperationException - if the implementation doesn't support ordering.
int storeRow(RowItem row)
throws java.lang.UnsupportedOperationException,
java.sql.SQLException
columnToValueMap - A map containing the values for all columns to be stored or
updated.
java.lang.UnsupportedOperationException - if the implementation is read only.
java.sql.SQLException
boolean removeRow(RowItem row)
throws java.lang.UnsupportedOperationException,
java.sql.SQLException
row - RowItem to be removed
java.lang.UnsupportedOperationException
java.sql.SQLException
void beginTransaction()
throws java.sql.SQLException
java.sql.SQLException - if the database access fails.
void commit()
throws java.sql.SQLException
java.sql.SQLException - if the database access fails.
void rollback()
throws java.sql.SQLException
java.sql.SQLException - if the database access fails.java.util.List<java.lang.String> getPrimaryKeyColumns()
boolean containsRowWithKey(java.lang.Object... keys)
throws java.sql.SQLException
keys - the primary keys
java.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||