public abstract class SqlMapClientDaoSupport
extends org.springframework.dao.support.DaoSupport
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.
setSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient)
,
setSqlMapClientTemplate(org.springframework.orm.ibatis.SqlMapClientTemplate)
,
SqlMapClientTemplate
,
JdbcAccessor.setExceptionTranslator(org.springframework.jdbc.support.SQLExceptionTranslator)
Constructor and Description |
---|
SqlMapClientDaoSupport() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkDaoConfig() |
javax.sql.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(javax.sql.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.
|
public final void setDataSource(javax.sql.DataSource dataSource)
public final javax.sql.DataSource getDataSource()
public final void setSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient sqlMapClient)
public final com.ibatis.sqlmap.client.SqlMapClient getSqlMapClient()
public final void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate)
public final SqlMapClientTemplate getSqlMapClientTemplate()
protected final void checkDaoConfig()
checkDaoConfig
in class org.springframework.dao.support.DaoSupport