|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.ibatis.support.SqlMapClientDaoSupport
public abstract class SqlMapClientDaoSupport
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.
setSqlMapClient(SqlMapClient)
,
setSqlMapClientTemplate(org.springframework.orm.ibatis.SqlMapClientTemplate)
,
SqlMapClientTemplate
,
JdbcAccessor.setExceptionTranslator(org.springframework.jdbc.support.SQLExceptionTranslator)
Field Summary | |
---|---|
private boolean |
externalTemplate
|
private SqlMapClientTemplate |
sqlMapClientTemplate
|
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. |
javax.sql.DataSource |
getDataSource()
Return the JDBC DataSource used by this DAO. |
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(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 |
Field Detail |
---|
private SqlMapClientTemplate sqlMapClientTemplate
private boolean externalTemplate
Constructor Detail |
---|
public SqlMapClientDaoSupport()
Method Detail |
---|
public final void setDataSource(javax.sql.DataSource dataSource)
setSqlMapClient(SqlMapClient)
public final javax.sql.DataSource getDataSource()
public final void setSqlMapClient(SqlMapClient sqlMapClient)
setSqlMapClientTemplate(org.springframework.orm.ibatis.SqlMapClientTemplate)
public final SqlMapClient getSqlMapClient()
public final void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate)
setSqlMapClient(SqlMapClient)
public final SqlMapClientTemplate getSqlMapClientTemplate()
protected final void checkDaoConfig()
DaoSupport
Implementors should be marked as final
checkDaoConfig
in class DaoSupport
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |