|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.orm.ibatis.support.SqlMapClientDaoSupport
Convenient super class for iBATIS SqlMapClient data access objects. Requires a DataSource to be set, providing a SqlMapClientTemplate based on it to subclasses.
SqlMapClientTemplate
Field Summary | |
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
SqlMapClientDaoSupport()
|
Method Summary | |
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware). |
protected javax.sql.DataSource |
getDataSource()
Return the JDBC DataSource used by this DAO. |
protected com.ibatis.sqlmap.client.SqlMapClient |
getSqlMapClient()
Return the iBATIS Database Layer SqlMap that this template works with. |
protected SqlMapClientTemplate |
getSqlMapClientTemplate()
Return the JdbcTemplate for this DAO, pre-initialized with the DataSource or set explicitly. |
protected void |
initDao()
Subclasses can override this for custom initialization behavior. |
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 SqlMap to work with. |
void |
setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate)
Set the JdbcTemplate for this DAO explicitly, as an alternative to specifying a DataSource. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final org.apache.commons.logging.Log logger
Constructor Detail |
public SqlMapClientDaoSupport()
Method Detail |
public final void setDataSource(javax.sql.DataSource dataSource)
protected final javax.sql.DataSource getDataSource()
public final void setSqlMapClient(com.ibatis.sqlmap.client.SqlMapClient sqlMapClient)
protected final com.ibatis.sqlmap.client.SqlMapClient getSqlMapClient()
public final void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate)
protected final SqlMapClientTemplate getSqlMapClientTemplate()
public final void afterPropertiesSet() throws java.lang.Exception
InitializingBean
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
afterPropertiesSet
in interface InitializingBean
java.lang.Exception
- in the event of misconfiguration (such
as failure to set an essential property) or if initialization fails.protected void initDao() throws java.lang.Exception
java.lang.Exception
- if initialization fails
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |