|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ExtendedSqlMapClient
| Method Summary | |
|---|---|
void |
commitTransaction()
Deprecated. Commits the currently started transaction. |
int |
delete(String id)
Deprecated. Executes a mapped SQL DELETE statement. |
int |
delete(String id,
Object param)
Deprecated. Executes a mapped SQL DELETE statement. |
void |
endTransaction()
Deprecated. Ends a transaction and rolls back if necessary. |
int |
executeBatch()
Deprecated. Executes (flushes) all statements currently batched. |
List |
executeBatchDetailed()
Deprecated. Executes (flushes) all statements currently batched. |
void |
flushDataCache()
Deprecated. Flushes all data caches. |
void |
flushDataCache(String cacheId)
Deprecated. Flushes the data cache that matches the cache model ID provided. |
Connection |
getCurrentConnection()
Deprecated. Returns the current connection in use. |
DataSource |
getDataSource()
Deprecated. Returns the DataSource instance currently being used by the SqlMapSession. |
SqlMapExecutorDelegate |
getDelegate()
Deprecated. |
MappedStatement |
getMappedStatement(String id)
Deprecated. |
ResultObjectFactory |
getResultObjectFactory()
Deprecated. |
SqlMapSession |
getSession()
Deprecated. TODO : Deprecated and will be removed. |
SqlExecutor |
getSqlExecutor()
Deprecated. |
Connection |
getUserConnection()
Deprecated. Returns the current user supplied connection as set by setUserConnection(). |
Object |
insert(String id)
Deprecated. Executes a mapped SQL INSERT statement. |
Object |
insert(String id,
Object param)
Deprecated. Executes a mapped SQL INSERT statement. |
boolean |
isEnhancementEnabled()
Deprecated. |
boolean |
isLazyLoadingEnabled()
Deprecated. |
SqlMapSession |
openSession()
Deprecated. Returns a single threaded SqlMapSession implementation for use by one user. |
SqlMapSession |
openSession(Connection conn)
Deprecated. Returns a single threaded SqlMapSession implementation for use by one user. |
List |
queryForList(String id)
Deprecated. Executes a mapped SQL SELECT statement that returns data to populate a number of result objects. |
List |
queryForList(String id,
int skip,
int max)
Deprecated. Executes a mapped SQL SELECT statement that returns data to populate a number of result objects within a certain range. |
List |
queryForList(String id,
Object paramObject)
Deprecated. Executes a mapped SQL SELECT statement that returns data to populate a number of result objects. |
List |
queryForList(String id,
Object paramObject,
int skip,
int max)
Deprecated. Executes a mapped SQL SELECT statement that returns data to populate a number of result objects within a certain range. |
Map |
queryForMap(String id,
Object paramObject,
String keyProp)
Deprecated. Executes a mapped SQL SELECT statement that returns data to populate a number of result objects that will be keyed into a Map. |
Map |
queryForMap(String id,
Object paramObject,
String keyProp,
String valueProp)
Deprecated. Executes a mapped SQL SELECT statement that returns data to populate a number of result objects from which one property will be keyed into a Map. |
Object |
queryForObject(String id)
Deprecated. Executes a mapped SQL SELECT statement that returns data to populate a single object instance. |
Object |
queryForObject(String id,
Object paramObject)
Deprecated. Executes a mapped SQL SELECT statement that returns data to populate a single object instance. |
Object |
queryForObject(String id,
Object paramObject,
Object resultObject)
Deprecated. Executes a mapped SQL SELECT statement that returns data to populate the supplied result object. |
PaginatedList |
queryForPaginatedList(String id,
int pageSize)
Deprecated. Executes a mapped SQL SELECT statement that returns data to populate a number of result objects a page at a time. |
PaginatedList |
queryForPaginatedList(String id,
Object paramObject,
int pageSize)
Deprecated. Executes a mapped SQL SELECT statement that returns data to populate a number of result objects a page at a time. |
void |
queryWithRowHandler(String id,
Object paramObject,
RowHandler rowHandler)
Deprecated. Executes a mapped SQL SELECT statement that returns a number of result objects that will be handled one at a time by a RowHandler. |
void |
queryWithRowHandler(String id,
RowHandler rowHandler)
Deprecated. Executes a mapped SQL SELECT statement that returns a number of result objects that will be handled one at a time by a RowHandler. |
void |
setUserConnection(Connection connection)
Deprecated. Allows the developer to easily use an externally supplied connection when executing statements. |
void |
startBatch()
Deprecated. Starts a batch in which update statements will be cached before being sent to the database all at once. |
void |
startTransaction()
Deprecated. Demarcates the beginning of a transaction scope. |
void |
startTransaction(int transactionIsolation)
Deprecated. Demarcates the beginning of a transaction scope using the specified transaction isolation. |
int |
update(String id)
Deprecated. Executes a mapped SQL UPDATE statement. |
int |
update(String id,
Object param)
Deprecated. Executes a mapped SQL UPDATE statement. |
| Method Detail |
|---|
Object insert(String id,
Object param)
throws SQLException
SqlMapExecutor
insert in interface SqlMapExecutorid - The name of the statement to execute.param - The parameter object (e.g. JavaBean, Map, XML etc.).
SQLException - If an error occurs.
Object insert(String id)
throws SQLException
SqlMapExecutor
insert in interface SqlMapExecutorid - The name of the statement to execute.
SQLException - If an error occurs.
int update(String id,
Object param)
throws SQLException
SqlMapExecutor
update in interface SqlMapExecutorid - The name of the statement to execute.param - The parameter object (e.g. JavaBean, Map, XML etc.).
SQLException - If an error occurs.
int update(String id)
throws SQLException
SqlMapExecutor
update in interface SqlMapExecutorid - The name of the statement to execute.
SQLException - If an error occurs.
int delete(String id,
Object param)
throws SQLException
SqlMapExecutor
delete in interface SqlMapExecutorid - The name of the statement to execute.param - The parameter object (e.g. JavaBean, Map, XML etc.).
SQLException - If an error occurs.
int delete(String id)
throws SQLException
SqlMapExecutor
delete in interface SqlMapExecutorid - The name of the statement to execute.
SQLException - If an error occurs.
Object queryForObject(String id,
Object paramObject)
throws SQLException
SqlMapExecutor
queryForObject in interface SqlMapExecutorid - The name of the statement to execute.paramObject - The parameter object (e.g. JavaBean, Map, XML etc.).
SQLException - If more than one result was found, or if any other error occurs.
Object queryForObject(String id)
throws SQLException
SqlMapExecutor
queryForObject in interface SqlMapExecutorid - The name of the statement to execute.
SQLException - If more than one result was found, or if any other error occurs.
Object queryForObject(String id,
Object paramObject,
Object resultObject)
throws SQLException
SqlMapExecutor
queryForObject in interface SqlMapExecutorid - The name of the statement to execute.paramObject - The parameter object (e.g. JavaBean, Map, XML etc.).resultObject - The result object instance that should be populated with result data.
SQLException - If more than one result was found, or if any other error occurs.
List queryForList(String id,
Object paramObject)
throws SQLException
SqlMapExecutor
queryForList in interface SqlMapExecutorid - The name of the statement to execute.paramObject - The parameter object (e.g. JavaBean, Map, XML etc.).
SQLException - If an error occurs.
List queryForList(String id)
throws SQLException
SqlMapExecutor
queryForList in interface SqlMapExecutorid - The name of the statement to execute.
SQLException - If an error occurs.
List queryForList(String id,
Object paramObject,
int skip,
int max)
throws SQLException
SqlMapExecutor
queryForList in interface SqlMapExecutorid - The name of the statement to execute.paramObject - The parameter object (e.g. JavaBean, Map, XML etc.).skip - The number of results to ignore.max - The maximum number of results to return.
SQLException - If an error occurs.
List queryForList(String id,
int skip,
int max)
throws SQLException
SqlMapExecutor
queryForList in interface SqlMapExecutorid - The name of the statement to execute.skip - The number of results to ignore.max - The maximum number of results to return.
SQLException - If an error occurs.
PaginatedList queryForPaginatedList(String id,
Object paramObject,
int pageSize)
throws SQLException
SqlMapExecutor
queryForPaginatedList in interface SqlMapExecutorid - The name of the statement to execute.paramObject - The parameter object (e.g. JavaBean, Map, XML etc.).pageSize - The maximum number of result objects each page can hold.
SQLException - If an error occurs.
PaginatedList queryForPaginatedList(String id,
int pageSize)
throws SQLException
SqlMapExecutor
queryForPaginatedList in interface SqlMapExecutorid - The name of the statement to execute.pageSize - The maximum number of result objects each page can hold.
SQLException - If an error occurs.
Map queryForMap(String id,
Object paramObject,
String keyProp)
throws SQLException
SqlMapExecutor
queryForMap in interface SqlMapExecutorid - The name of the statement to execute.paramObject - The parameter object (e.g. JavaBean, Map, XML etc.).keyProp - The property to be used as the key in the Map.
SQLException - If an error occurs.
Map queryForMap(String id,
Object paramObject,
String keyProp,
String valueProp)
throws SQLException
SqlMapExecutor
queryForMap in interface SqlMapExecutorid - The name of the statement to execute.paramObject - The parameter object (e.g. JavaBean, Map, XML etc.).keyProp - The property to be used as the key in the Map.valueProp - The property to be used as the value in the Map.
SQLException - If an error occurs.
void queryWithRowHandler(String id,
Object paramObject,
RowHandler rowHandler)
throws SQLException
SqlMapExecutor
queryWithRowHandler in interface SqlMapExecutorid - The name of the statement to execute.paramObject - The parameter object (e.g. JavaBean, Map, XML etc.).rowHandler - A RowHandler instance
SQLException - If an error occurs.
void queryWithRowHandler(String id,
RowHandler rowHandler)
throws SQLException
SqlMapExecutor
queryWithRowHandler in interface SqlMapExecutorid - The name of the statement to execute.rowHandler - A RowHandler instance
SQLException - If an error occurs.
void startTransaction()
throws SQLException
SqlMapTransactionManager
try {
sqlMap.startTransaction();
// do work
sqlMap.commitTransaction();
} finally {
sqlMap.endTransaction();
}
Always call endTransaction() once startTransaction() has been called.
startTransaction in interface SqlMapTransactionManagerSQLException - If an error occurs while starting the transaction, or
the transaction could not be started.
void startTransaction(int transactionIsolation)
throws SQLException
SqlMapTransactionManager
try {
sqlMap.startTransaction(Connection.TRANSACTION_REPEATABLE_READ);
// do work
sqlMap.commitTransaction();
} finally {
sqlMap.endTransaction();
}
Always call endTransaction() once startTransaction() has been called.
startTransaction in interface SqlMapTransactionManagerSQLException - If an error occurs while starting the transaction, or
the transaction could not be started.
void commitTransaction()
throws SQLException
SqlMapTransactionManager
commitTransaction in interface SqlMapTransactionManagerSQLException - If an error occurs while committing the transaction, or
the transaction could not be committed.
void endTransaction()
throws SQLException
SqlMapTransactionManager
endTransaction in interface SqlMapTransactionManagerSQLException - If an error occurs during rollback or the transaction could
not be ended.
void startBatch()
throws SQLException
SqlMapExecutor
startBatch in interface SqlMapExecutorSQLException - If the batch could not be started.
int executeBatch()
throws SQLException
SqlMapExecutor
executeBatch in interface SqlMapExecutorSQLException - If the batch could not be executed or if any of the statements
fails.
List executeBatchDetailed()
throws SQLException,
BatchException
SqlMapExecutor
executeBatchDetailed in interface SqlMapExecutorSQLException - if a database access error occurs, or the drive
does not support batch statements
BatchException - if the driver throws BatchUpdateExceptionBatchException
void setUserConnection(Connection connection)
throws SQLException
SqlMapTransactionManager
try {
Connection connection = dataSource.getConnection();
sqlMap.setUserConnection(connection);
// do work
connection.commit();
} catch (SQLException e) {
try {
if (connection != null) commit.rollback();
} catch (SQLException ignored) {
// generally ignored
}
throw e; // rethrow the exception
} finally {
try {
if (connection != null) connection.close();
} catch (SQLException ignored) {
// generally ignored
}
}
setUserConnection in interface SqlMapTransactionManagerSQLException
Connection getUserConnection()
throws SQLException
SqlMapTransactionManager
getUserConnection in interface SqlMapTransactionManagerSQLException
Connection getCurrentConnection()
throws SQLException
SqlMapTransactionManager
getCurrentConnection in interface SqlMapTransactionManagerSQLExceptionDataSource getDataSource()
SqlMapTransactionManager
getDataSource in interface SqlMapTransactionManagerMappedStatement getMappedStatement(String id)
boolean isLazyLoadingEnabled()
boolean isEnhancementEnabled()
SqlExecutor getSqlExecutor()
SqlMapExecutorDelegate getDelegate()
SqlMapSession openSession()
SqlMapClient
openSession in interface SqlMapClientSqlMapSession openSession(Connection conn)
SqlMapClient
try {
Connection connection = dataSource.getConnection();
SqlMapSession session = sqlMap.openSession(connection);
// do work
connection.commit();
} catch (SQLException e) {
try {
if (connection != null) commit.rollback();
} catch (SQLException ignored) {
// generally ignored
}
throw e; // rethrow the exception
} finally {
try {
if (connection != null) connection.close();
} catch (SQLException ignored) {
// generally ignored
}
}
openSession in interface SqlMapClientconn - - the connection to use for the session
SqlMapSession getSession()
SqlMapClient
getSession in interface SqlMapClientvoid flushDataCache()
SqlMapClient
flushDataCache in interface SqlMapClientvoid flushDataCache(String cacheId)
SqlMapClient
flushDataCache in interface SqlMapClientcacheId - The cache model to flushResultObjectFactory getResultObjectFactory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||