站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

SqlMapClientDaoSupport (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.orm.ibatis.support
Class SqlMapClientDaoSupport

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.ibatis.support.SqlMapClientDaoSupport
All Implemented Interfaces:
InitializingBean

public abstract class SqlMapClientDaoSupport
extends DaoSupport

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.

Since:
24.02.2004
Author:
Juergen Hoeller
See Also:
setSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient), setSqlMapClientTemplate(org.springframework.orm.ibatis.SqlMapClientTemplate), SqlMapClientTemplate, JdbcAccessor.setExceptionTranslator(org.springframework.jdbc.support.SQLExceptionTranslator)

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
SqlMapClientDaoSupport()
           
 
Method Summary
protected  void checkDaoConfig()
          Abstract subclasses must override this to check their configuration.
 DataSource getDataSource()
          Return the JDBC DataSource used by this DAO.
 com.ibatis.sqlmap.client.SqlMapClient getSqlMapClient()
          Return the iBATIS Database Layer SqlMapClient that this template works with.
 SqlMapClientTemplate getSqlMapClientTemplate()
          Return the SqlMapClientTemplate for this DAO, pre-initialized with the SqlMapClient or set explicitly.
 void setDataSource(DataSource dataSource)
          Set the JDBC DataSource to be used by this DAO.
 void setSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient sqlMapClient)
          Set the iBATIS Database Layer SqlMapClient to work with.
 void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate)
          Set the SqlMapClientTemplate for this DAO explicitly, as an alternative to specifying a SqlMapClient.
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlMapClientDaoSupport

public SqlMapClientDaoSupport()
Method Detail

setDataSource

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.

See Also:
setSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient)

getDataSource

public final DataSource getDataSource()
Return the JDBC DataSource used by this DAO.


setSqlMapClient

public final void setSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient sqlMapClient)
Set the iBATIS Database Layer SqlMapClient to work with. Either this or a "sqlMapClientTemplate" is required.

See Also:
setSqlMapClientTemplate(org.springframework.orm.ibatis.SqlMapClientTemplate)

getSqlMapClient

public final com.ibatis.sqlmap.client.SqlMapClient getSqlMapClient()
Return the iBATIS Database Layer SqlMapClient that this template works with.


setSqlMapClientTemplate

public final void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate)
Set the SqlMapClientTemplate for this DAO explicitly, as an alternative to specifying a SqlMapClient.

See Also:
setSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient)

getSqlMapClientTemplate

public final SqlMapClientTemplate getSqlMapClientTemplate()
Return the SqlMapClientTemplate for this DAO, pre-initialized with the SqlMapClient or set explicitly.


checkDaoConfig

protected final void checkDaoConfig()
Description copied from class: DaoSupport
Abstract subclasses must override this to check their configuration.

Implementors should be marked as final

Specified by:
checkDaoConfig in class DaoSupport

The Spring Framework

Copyright © 2002-2007 The Spring Framework.