|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Callback interface for data access code that works on an iBATIS Database Layer SqlMapSession. To be used with SqlMapClientTemplate's execute method, assumably often as anonymous classes within a method implementation.
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.
| Method Summary | |
java.lang.Object |
doInSqlMapClient(com.ibatis.sqlmap.client.SqlMapExecutor executor)
Gets called by SqlMapClientTemplate.execute with an active SqlMapSession. |
| Method Detail |
public java.lang.Object doInSqlMapClient(com.ibatis.sqlmap.client.SqlMapExecutor executor)
throws java.sql.SQLException
If called without a thread-bound JDBC transaction (initiated by DataSourceTransactionManager), the code will simply get executed on the underlying JDBC connection with its transactional semantics. If using a JTA-aware DataSource, the JDBC connection and thus the callback code will be transactional if a JTA transaction is active.
Allows for returning a result object created within the callback, i.e. a domain object or a collection of domain objects. Note that there's special support for single step actions: see SqlMapClientTemplate. A thrown RuntimeException is treated as application exception, it gets propagated to the caller of the template.
executor - an active iBATIS SqlMapSession, passed-in as
SqlMapExecutor interface here to avoid manual lifecycle handling
java.sql.SQLException - if throw my the iBATIS SQL Maps APISqlMapClientTemplate.execute(org.springframework.orm.ibatis.SqlMapClientCallback),
SqlMapClientTemplate.queryForList(java.lang.String, java.lang.Object),
SqlMapClientTemplate.queryForMap(java.lang.String, java.lang.Object, java.lang.String),
SqlMapClientTemplate.queryForObject(java.lang.String, java.lang.Object),
SqlMapClientTemplate.insert(java.lang.String, java.lang.Object),
SqlMapClientTemplate.update(java.lang.String, java.lang.Object),
SqlMapClientTemplate.delete(java.lang.String, java.lang.Object),
DataSourceTransactionManager
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||