public abstract class

SqlMapClientDaoSupport

extends DaoSupport
java.lang.Object
   ↳ org.springframework.dao.support.DaoSupport
     ↳ org.springframework.orm.ibatis.support.SqlMapClientDaoSupport

Class Overview

Convenient super class for iBATIS SqlMapClient data access objects. Requires a SqlMapClient to be set, providing a SqlMapClientTemplate based on it to subclasses.

Instead of a plain SqlMapClient, you can also pass a preconfigured SqlMapClientTemplate instance in. This allows you to share your SqlMapClientTemplate configuration for all your DAOs, for example a custom SQLExceptionTranslator to use.

Summary

[Expand]
Inherited Fields
From class org.springframework.dao.support.DaoSupport
Public Constructors
SqlMapClientDaoSupport()
Public Methods
final DataSource getDataSource()
Return the JDBC DataSource used by this DAO.
final SqlMapClient getSqlMapClient()
Return the iBATIS Database Layer SqlMapClient that this template works with.
final SqlMapClientTemplate getSqlMapClientTemplate()
Return the SqlMapClientTemplate for this DAO, pre-initialized with the SqlMapClient or set explicitly.
final void setDataSource(DataSource dataSource)
Set the JDBC DataSource to be used by this DAO.
final void setSqlMapClient(SqlMapClient sqlMapClient)
Set the iBATIS Database Layer SqlMapClient to work with.
final void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate)
Set the SqlMapClientTemplate for this DAO explicitly, as an alternative to specifying a SqlMapClient.
Protected Methods
final void checkDaoConfig()
Abstract subclasses must override this to check their configuration.
[Expand]
Inherited Methods
From class org.springframework.dao.support.DaoSupport
From class java.lang.Object
From interface org.springframework.beans.factory.InitializingBean

Public Constructors

public SqlMapClientDaoSupport ()

Public Methods

public final DataSource getDataSource ()

Return the JDBC DataSource used by this DAO.

public final SqlMapClient getSqlMapClient ()

Return the iBATIS Database Layer SqlMapClient that this template works with.

public final SqlMapClientTemplate getSqlMapClientTemplate ()

Return the SqlMapClientTemplate for this DAO, pre-initialized with the SqlMapClient or set explicitly.

public final void setDataSource (DataSource dataSource)

Set the JDBC DataSource to be used by this DAO. Not required: The SqlMapClient might carry a shared DataSource.

public final void setSqlMapClient (SqlMapClient sqlMapClient)

Set the iBATIS Database Layer SqlMapClient to work with. Either this or a "sqlMapClientTemplate" is required.

public final void setSqlMapClientTemplate (SqlMapClientTemplate sqlMapClientTemplate)

Set the SqlMapClientTemplate for this DAO explicitly, as an alternative to specifying a SqlMapClient.

Protected Methods

protected final void checkDaoConfig ()

Abstract subclasses must override this to check their configuration.

Implementors should be marked as final