|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IStorageSourceService
Method Summary | |
---|---|
void |
addListener(java.lang.String tableName,
IStorageSourceListener listener)
Add a listener to the specified table. |
IQuery |
createQuery(java.lang.String tableName,
java.lang.String[] columnNames,
IPredicate predicate,
RowOrdering ordering)
Create a query object representing the given query parameters. |
void |
createTable(java.lang.String tableName,
java.util.Set<java.lang.String> indexedColumns)
Create a new table if one does not already exist with the given name. |
void |
deleteMatchingRows(java.lang.String tableName,
IPredicate predicate)
Delete the rows that match the predicate |
java.util.concurrent.Future<?> |
deleteMatchingRowsAsync(java.lang.String tableName,
IPredicate predicate)
Asynchronous version of deleteRows |
void |
deleteRow(java.lang.String tableName,
java.lang.Object rowKey)
Delete the row with the given primary key. |
java.util.concurrent.Future<?> |
deleteRowAsync(java.lang.String tableName,
java.lang.Object rowKey)
Asynchronous version of deleteRow |
void |
deleteRows(java.lang.String tableName,
java.util.Set<java.lang.Object> rowKeys)
Delete the rows with the given keys. |
java.util.concurrent.Future<?> |
deleteRowsAsync(java.lang.String tableName,
java.util.Set<java.lang.Object> rowKeys)
Asynchronous version of deleteRows |
IResultSet |
executeQuery(IQuery query)
Execute a query created with createQuery. |
IResultSet |
executeQuery(java.lang.String tableName,
java.lang.String[] columnNames,
IPredicate predicate,
RowOrdering ordering)
Execute a query created with the given query parameters. |
java.lang.Object[] |
executeQuery(java.lang.String tableName,
java.lang.String[] columnNames,
IPredicate predicate,
RowOrdering ordering,
IRowMapper rowMapper)
Execute a query and call the row mapper to map the results to Java objects. |
java.util.concurrent.Future<IResultSet> |
executeQueryAsync(IQuery query)
Asynchronous variant of executeQuery. |
java.util.concurrent.Future<IResultSet> |
executeQueryAsync(java.lang.String tableName,
java.lang.String[] columnNames,
IPredicate predicate,
RowOrdering ordering)
Asynchronous variant of executeQuery. |
java.util.concurrent.Future<java.lang.Object[]> |
executeQueryAsync(java.lang.String tableName,
java.lang.String[] columnNames,
IPredicate predicate,
RowOrdering ordering,
IRowMapper rowMapper)
Asynchronous variant of executeQuery |
java.util.Set<java.lang.String> |
getAllTableNames()
|
IResultSet |
getRow(java.lang.String tableName,
java.lang.Object rowKey)
Query for a row with the given ID (primary key). |
java.util.concurrent.Future<?> |
getRowAsync(java.lang.String tableName,
java.lang.Object rowKey)
Asynchronous version of getRow |
void |
insertRow(java.lang.String tableName,
java.util.Map<java.lang.String,java.lang.Object> values)
Insert a new row in the table with the given column data. |
java.util.concurrent.Future<?> |
insertRowAsync(java.lang.String tableName,
java.util.Map<java.lang.String,java.lang.Object> values)
Asynchronous variant of insertRow. |
void |
notifyListeners(java.util.List<StorageSourceNotification> notifications)
This is logically a private method and should not be called by clients of this interface. |
void |
removeListener(java.lang.String tableName,
IStorageSourceListener listener)
Remove a listener from the specified table. |
java.util.concurrent.Future<?> |
saveAsync(IResultSet resultSet)
Asynchronous version of save |
void |
setExceptionHandler(IStorageExceptionHandler exceptionHandler)
Set exception handler to use for asynchronous operations. |
void |
setTablePrimaryKeyName(java.lang.String tableName,
java.lang.String primaryKeyName)
Set the column to be used as the primary key for a table. |
void |
updateMatchingRows(java.lang.String tableName,
IPredicate predicate,
java.util.Map<java.lang.String,java.lang.Object> values)
Update the rows in the given table. |
java.util.concurrent.Future<?> |
updateMatchingRowsAsync(java.lang.String tableName,
IPredicate predicate,
java.util.Map<java.lang.String,java.lang.Object> values)
Asynchronous variant of updateMatchingRows |
void |
updateRow(java.lang.String tableName,
java.util.Map<java.lang.String,java.lang.Object> values)
Update or insert a row in the table with the given column data. |
void |
updateRow(java.lang.String tableName,
java.lang.Object rowKey,
java.util.Map<java.lang.String,java.lang.Object> values)
Update or insert a row in the table with the given row key (primary key) and column names/values. |
java.util.concurrent.Future<?> |
updateRowAsync(java.lang.String tableName,
java.util.Map<java.lang.String,java.lang.Object> values)
Asynchronous version of updateRow |
java.util.concurrent.Future<?> |
updateRowAsync(java.lang.String tableName,
java.lang.Object rowKey,
java.util.Map<java.lang.String,java.lang.Object> values)
Asynchronous variant of updateRow |
void |
updateRows(java.lang.String tableName,
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> rows)
Update or insert a list of rows in the table. |
java.util.concurrent.Future<?> |
updateRowsAsync(java.lang.String tableName,
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> rows)
Asynchronous variant of updateRows |
Method Detail |
---|
void setTablePrimaryKeyName(java.lang.String tableName, java.lang.String primaryKeyName)
tableName
- The name of the table for which we're setting the keyprimaryKeyName
- The name of column to be used as the primary keyvoid createTable(java.lang.String tableName, java.util.Set<java.lang.String> indexedColumns)
tableName
- The name of the table to create.indexedColumns
- Which columns should be indexedjava.util.Set<java.lang.String> getAllTableNames()
IQuery createQuery(java.lang.String tableName, java.lang.String[] columnNames, IPredicate predicate, RowOrdering ordering)
tableName
- The name of the table to query.columnNames
- The list of columns to return in the result set.predicate
- The predicate that specifies which rows to return in the result set.ordering
- Specification of order that rows are returned from the result set
returned from executing the query. If the ordering is null, then rows are returned
in an implementation-specific order.
IResultSet executeQuery(IQuery query)
query
- The query to execute
IResultSet executeQuery(java.lang.String tableName, java.lang.String[] columnNames, IPredicate predicate, RowOrdering ordering)
tableName
- The name of the table to query.columnNames
- The list of columns to return in the result set.predicate
- The predicate that specifies which rows to return in the result set.ordering
- Specification of order that rows are returned from the result set
returned from executing the query. If the ordering is null, then rows are returned
in an implementation-specific order.
java.lang.Object[] executeQuery(java.lang.String tableName, java.lang.String[] columnNames, IPredicate predicate, RowOrdering ordering, IRowMapper rowMapper)
tableName
- The name of the table to query.columnNames
- The list of columns to return in the result set.predicate
- The predicate that specifies which rows to return in the result set.ordering
- Specification of order that rows are returned from the result set
returned from executing the query. If the ordering is null, then rows are returned
in an implementation-specific order.rowMapper
- The client-supplied object that maps the data in a row in the result
set to a client object.
void insertRow(java.lang.String tableName, java.util.Map<java.lang.String,java.lang.Object> values)
tableName
- The name of the table to which to add the rowvalues
- The map of column names/values to add to the table.void updateRows(java.lang.String tableName, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> rows)
tableName
- The table to update or insert intovalues
- The map of column names/values to update the rowsvoid updateMatchingRows(java.lang.String tableName, IPredicate predicate, java.util.Map<java.lang.String,java.lang.Object> values)
tableName
- The table to updatepredicate
- The predicate to use to select which rows to updatevalues
- The map of column names/values to update the rows.void updateRow(java.lang.String tableName, java.lang.Object rowKey, java.util.Map<java.lang.String,java.lang.Object> values)
tableName
- The table to update or insert intorowKey
- The ID (primary key) of the row to updatevalues
- The map of column names/values to update the rowsvoid updateRow(java.lang.String tableName, java.util.Map<java.lang.String,java.lang.Object> values)
tableName
- The table to update or insert intovalues
- The map of column names/values to update the rowsvoid deleteRow(java.lang.String tableName, java.lang.Object rowKey)
tableName
- The table from which to delete the rowrowKey
- The primary key of the row to delete.void deleteRows(java.lang.String tableName, java.util.Set<java.lang.Object> rowKeys)
tableName
- The table from which to delete the rowsrowKeys
- The set of primary keys of the rows to delete.void deleteMatchingRows(java.lang.String tableName, IPredicate predicate)
tableName
- predicate
- IResultSet getRow(java.lang.String tableName, java.lang.Object rowKey)
tableName
- The name of the table to queryrowKey
- The primary key of the row
void setExceptionHandler(IStorageExceptionHandler exceptionHandler)
exceptionHandler
- java.util.concurrent.Future<IResultSet> executeQueryAsync(IQuery query)
query
-
java.util.concurrent.Future<IResultSet> executeQueryAsync(java.lang.String tableName, java.lang.String[] columnNames, IPredicate predicate, RowOrdering ordering)
tableName
- columnNames
- predicate
- ordering
-
java.util.concurrent.Future<java.lang.Object[]> executeQueryAsync(java.lang.String tableName, java.lang.String[] columnNames, IPredicate predicate, RowOrdering ordering, IRowMapper rowMapper)
tableName
- columnNames
- predicate
- ordering
- rowMapper
-
java.util.concurrent.Future<?> insertRowAsync(java.lang.String tableName, java.util.Map<java.lang.String,java.lang.Object> values)
tableName
- values
-
java.util.concurrent.Future<?> updateRowsAsync(java.lang.String tableName, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> rows)
tableName
- rows
- java.util.concurrent.Future<?> updateMatchingRowsAsync(java.lang.String tableName, IPredicate predicate, java.util.Map<java.lang.String,java.lang.Object> values)
tableName
- predicate
- values
-
java.util.concurrent.Future<?> updateRowAsync(java.lang.String tableName, java.lang.Object rowKey, java.util.Map<java.lang.String,java.lang.Object> values)
tableName
- rowKey
- values
-
java.util.concurrent.Future<?> updateRowAsync(java.lang.String tableName, java.util.Map<java.lang.String,java.lang.Object> values)
tableName
- values
-
java.util.concurrent.Future<?> deleteRowAsync(java.lang.String tableName, java.lang.Object rowKey)
tableName
- rowKey
-
java.util.concurrent.Future<?> deleteRowsAsync(java.lang.String tableName, java.util.Set<java.lang.Object> rowKeys)
tableName
- rowKeys
-
java.util.concurrent.Future<?> deleteMatchingRowsAsync(java.lang.String tableName, IPredicate predicate)
tableName
- predicate
-
java.util.concurrent.Future<?> getRowAsync(java.lang.String tableName, java.lang.Object rowKey)
tableName
- rowKey
-
java.util.concurrent.Future<?> saveAsync(IResultSet resultSet)
resultSet
-
void addListener(java.lang.String tableName, IStorageSourceListener listener)
tableName
- The name of the table to listen for modificationslistener
- The listener instance to callvoid removeListener(java.lang.String tableName, IStorageSourceListener listener)
tableName
- The name of the table with the listenerlistener
- The previously installed listener instancevoid notifyListeners(java.util.List<StorageSourceNotification> notifications)
notifications
- the notifications to dispatch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |