|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface that specifies a basic set of iBATIS SqlMapClient operations. Implemented by SqlMapClientTemplate. Not often used, but a useful option to enhance testability, as it can easily be mocked or stubbed.
Provides SqlMapClientTemplate's convenience methods that mirror SqlMapExecutor's execution methods. See the SqlMapExecutor javadocs for details on those methods.
NOTE: The SqlMapClient/SqlMapSession API is the API of iBATIS SQL Maps 2. With SQL Maps 1.x, the SqlMap/MappedStatement API has to be used.
SqlMapClientTemplate
,
SqlMapClient
,
SqlMapSession
,
SqlMapExecutor
Method Summary | |
int |
delete(String statementName,
Object parameterObject)
|
void |
delete(String statementName,
Object parameterObject,
int requiredRowsAffected)
Convenience method provided by Spring: execute a delete operation with an automatic check that the delete affected the given required number of rows. |
Object |
insert(String statementName,
Object parameterObject)
|
List |
queryForList(String statementName,
Object parameterObject)
|
List |
queryForList(String statementName,
Object parameterObject,
int skipResults,
int maxResults)
|
Map |
queryForMap(String statementName,
Object parameterObject,
String keyProperty)
|
Map |
queryForMap(String statementName,
Object parameterObject,
String keyProperty,
String valueProperty)
|
Object |
queryForObject(String statementName,
Object parameterObject)
|
Object |
queryForObject(String statementName,
Object parameterObject,
Object resultObject)
|
PaginatedList |
queryForPaginatedList(String statementName,
Object parameterObject,
int pageSize)
|
void |
queryWithRowHandler(String statementName,
Object parameterObject,
RowHandler rowHandler)
|
int |
update(String statementName,
Object parameterObject)
|
void |
update(String statementName,
Object parameterObject,
int requiredRowsAffected)
Convenience method provided by Spring: execute an update operation with an automatic check that the update affected the given required number of rows. |
Method Detail |
public Object queryForObject(String statementName, Object parameterObject) throws DataAccessException
DataAccessException
- in case of errorsSqlMapExecutor.queryForObject(String, Object)
public Object queryForObject(String statementName, Object parameterObject, Object resultObject) throws DataAccessException
DataAccessException
- in case of errorsSqlMapExecutor.queryForObject(String, Object, Object)
public List queryForList(String statementName, Object parameterObject) throws DataAccessException
DataAccessException
- in case of errorsSqlMapExecutor.queryForList(String, Object)
public List queryForList(String statementName, Object parameterObject, int skipResults, int maxResults) throws DataAccessException
DataAccessException
- in case of errorsSqlMapExecutor.queryForList(String, Object, int, int)
public void queryWithRowHandler(String statementName, Object parameterObject, RowHandler rowHandler) throws DataAccessException
DataAccessException
- in case of errorsSqlMapExecutor.queryWithRowHandler(String, Object, RowHandler)
public PaginatedList queryForPaginatedList(String statementName, Object parameterObject, int pageSize) throws DataAccessException
DataAccessException
- in case of errorsSqlMapExecutor.queryForPaginatedList(String, Object, int)
public Map queryForMap(String statementName, Object parameterObject, String keyProperty) throws DataAccessException
DataAccessException
- in case of errorsSqlMapExecutor.queryForMap(String, Object, String)
public Map queryForMap(String statementName, Object parameterObject, String keyProperty, String valueProperty) throws DataAccessException
DataAccessException
- in case of errorsSqlMapExecutor.queryForMap(String, Object, String, String)
public Object insert(String statementName, Object parameterObject) throws DataAccessException
DataAccessException
- in case of errorsSqlMapExecutor.insert(String, Object)
public int update(String statementName, Object parameterObject) throws DataAccessException
DataAccessException
- in case of errorsSqlMapExecutor.update(String, Object)
public int delete(String statementName, Object parameterObject) throws DataAccessException
DataAccessException
- in case of errorsSqlMapExecutor.delete(String, Object)
public void update(String statementName, Object parameterObject, int requiredRowsAffected) throws DataAccessException
statementName
- the name of the mapped statementparameterObject
- the parameter objectrequiredRowsAffected
- the number of rows that the update is
required to affect
DataAccessException
- in case of errorspublic void delete(String statementName, Object parameterObject, int requiredRowsAffected) throws DataAccessException
statementName
- the name of the mapped statementparameterObject
- the parameter objectrequiredRowsAffected
- the number of rows that the delete is
required to affect
DataAccessException
- in case of errors
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |