org.springframework.orm.ibatis

## Interface SqlMapClientCallback<T>

Deprecated.
as of Spring 3.2, in favor of the native Spring support in the Mybatis follow-up project (http://code.google.com/p/mybatis/)

    @Deprecated
    public interface SqlMapClientCallback<T>

Callback interface for data access code that works with the iBATIS `SqlMapExecutor` interface. To be used with `SqlMapClientTemplate`'s `execute` method, assumably often as anonymous classes within a method implementation.

Since:
  24.02.2004
Author:
  Juergen Hoeller
See Also:
  `SqlMapClientTemplate`, `DataSourceTransactionManager`

### Method Summary

Methods
`T` `doInSqlMapClient(SqlMapExecutor executor)` Deprecated. Gets called by `SqlMapClientTemplate.execute` with an active `SqlMapExecutor`.

### Method Detail

#### doInSqlMapClient

    T doInSqlMapClient(SqlMapExecutor executor)
                       throws SQLException

Deprecated.
Gets called by `SqlMapClientTemplate.execute` with an active `SqlMapExecutor`. Does not need to care about activating or closing the `SqlMapExecutor`, or handling transactions.

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. A thrown custom RuntimeException is treated as an application exception: It gets propagated to the caller of the template.

Parameters:
  `executor` - an active iBATIS SqlMapSession, passed-in as SqlMapExecutor interface here to avoid manual lifecycle handling
Returns:
  a result object, or `null` if none
Throws:
  `SQLException` - if thrown by the iBATIS SQL Maps API
See Also:
  `SqlMapClientTemplate.execute(org.springframework.orm.ibatis.SqlMapClientCallback<T>)`, `SqlMapClientTemplate.executeWithListResult(org.springframework.orm.ibatis.SqlMapClientCallback<java.util.List>)`, `SqlMapClientTemplate.executeWithMapResult(org.springframework.orm.ibatis.SqlMapClientCallback<java.util.Map>)`