org.springframework.orm.ibatis
Interface SqlMapClientOperations

All Known Implementing Classes:
SqlMapClientTemplate

public interface SqlMapClientOperations

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.

Since:
24.02.2004
Author:
Juergen Hoeller
See Also:
SqlMapClientTemplate, SqlMapClient, SqlMapSession, SqlMapExecutor

Method Summary
 int delete(String statementName)
           
 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 insert(String statementName, Object parameterObject)
           
 List queryForList(String statementName)
           
 List queryForList(String statementName, int skipResults, int maxResults)
           
 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 queryForObject(String statementName, Object parameterObject)
           
 Object queryForObject(String statementName, Object parameterObject, Object resultObject)
           
 com.ibatis.common.util.PaginatedList queryForPaginatedList(String statementName, int pageSize)
           
 com.ibatis.common.util.PaginatedList queryForPaginatedList(String statementName, Object parameterObject, int pageSize)
           
 void queryWithRowHandler(String statementName, Object parameterObject, com.ibatis.sqlmap.client.event.RowHandler rowHandler)
           
 void queryWithRowHandler(String statementName, com.ibatis.sqlmap.client.event.RowHandler rowHandler)
           
 int update(String statementName)
           
 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

queryForObject

Object queryForObject(String statementName)
                      throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
com.ibatis.sqlmap.client.SqlMapExecutor#queryForObject(String)

queryForObject

Object queryForObject(String statementName,
                      Object parameterObject)
                      throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
SqlMapExecutor.queryForObject(String, Object)

queryForObject

Object queryForObject(String statementName,
                      Object parameterObject,
                      Object resultObject)
                      throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
SqlMapExecutor.queryForObject(String, Object, Object)

queryForList

List queryForList(String statementName)
                  throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
com.ibatis.sqlmap.client.SqlMapExecutor#queryForList(String)

queryForList

List queryForList(String statementName,
                  Object parameterObject)
                  throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
SqlMapExecutor.queryForList(String, Object)

queryForList

List queryForList(String statementName,
                  int skipResults,
                  int maxResults)
                  throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
com.ibatis.sqlmap.client.SqlMapExecutor#queryForList(String, int, int)

queryForList

List queryForList(String statementName,
                  Object parameterObject,
                  int skipResults,
                  int maxResults)
                  throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
SqlMapExecutor.queryForList(String, Object, int, int)

queryWithRowHandler

void queryWithRowHandler(String statementName,
                         com.ibatis.sqlmap.client.event.RowHandler rowHandler)
                         throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
com.ibatis.sqlmap.client.SqlMapExecutor#queryWithRowHandler(String, RowHandler)

queryWithRowHandler

void queryWithRowHandler(String statementName,
                         Object parameterObject,
                         com.ibatis.sqlmap.client.event.RowHandler rowHandler)
                         throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
SqlMapExecutor.queryWithRowHandler(String, Object, RowHandler)

queryForPaginatedList

com.ibatis.common.util.PaginatedList queryForPaginatedList(String statementName,
                                                           int pageSize)
                                                           throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
com.ibatis.sqlmap.client.SqlMapExecutor#queryForPaginatedList(String, int)

queryForPaginatedList

com.ibatis.common.util.PaginatedList queryForPaginatedList(String statementName,
                                                           Object parameterObject,
                                                           int pageSize)
                                                           throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
SqlMapExecutor.queryForPaginatedList(String, Object, int)

queryForMap

Map queryForMap(String statementName,
                Object parameterObject,
                String keyProperty)
                throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
SqlMapExecutor.queryForMap(String, Object, String)

queryForMap

Map queryForMap(String statementName,
                Object parameterObject,
                String keyProperty,
                String valueProperty)
                throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
SqlMapExecutor.queryForMap(String, Object, String, String)

insert

Object insert(String statementName)
              throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
com.ibatis.sqlmap.client.SqlMapExecutor#insert(String)

insert

Object insert(String statementName,
              Object parameterObject)
              throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
SqlMapExecutor.insert(String, Object)

update

int update(String statementName)
           throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
com.ibatis.sqlmap.client.SqlMapExecutor#update(String)

update

int update(String statementName,
           Object parameterObject)
           throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
SqlMapExecutor.update(String, Object)

update

void update(String statementName,
            Object parameterObject,
            int requiredRowsAffected)
            throws DataAccessException
Convenience method provided by Spring: execute an update operation with an automatic check that the update affected the given required number of rows.

Parameters:
statementName - the name of the mapped statement
parameterObject - the parameter object
requiredRowsAffected - the number of rows that the update is required to affect
Throws:
DataAccessException - in case of errors

delete

int delete(String statementName)
           throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
com.ibatis.sqlmap.client.SqlMapExecutor#delete(String)

delete

int delete(String statementName,
           Object parameterObject)
           throws DataAccessException
Throws:
DataAccessException - in case of errors
See Also:
SqlMapExecutor.delete(String, Object)

delete

void delete(String statementName,
            Object parameterObject,
            int requiredRowsAffected)
            throws DataAccessException
Convenience method provided by Spring: execute a delete operation with an automatic check that the delete affected the given required number of rows.

Parameters:
statementName - the name of the mapped statement
parameterObject - the parameter object
requiredRowsAffected - the number of rows that the delete is required to affect
Throws:
DataAccessException - in case of errors


Copyright (c) 2002-2007 The Spring Framework Project.