org.springframework.dao.support
Class DaoSupport
java.lang.Object
org.springframework.dao.support.DaoSupport
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
- CciDaoSupport
public abstract class DaoSupport
- extends java.lang.Object
- implements org.springframework.beans.factory.InitializingBean
Generic base class for DAOs, defining template methods for DAO initialization.
Extended by Spring's specific DAO support classes, such as:
JdbcDaoSupport, JdoDaoSupport, etc.
- Since:
- 1.2.2
- Author:
- Juergen Hoeller
- See Also:
org.springframework.jdbc.core.support.JdbcDaoSupport
,
org.springframework.orm.jdo.support.JdoDaoSupport
Field Summary |
protected org.apache.commons.logging.Log |
logger
Logger available to subclasses |
Method Summary |
void |
afterPropertiesSet()
|
protected abstract void |
checkDaoConfig()
Abstract subclasses must override this to check their configuration. |
protected void |
initDao()
Concrete subclasses can override this for custom initialization behavior. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
- Logger available to subclasses
DaoSupport
public DaoSupport()
afterPropertiesSet
public final void afterPropertiesSet()
throws java.lang.IllegalArgumentException,
org.springframework.beans.factory.BeanInitializationException
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.IllegalArgumentException
org.springframework.beans.factory.BeanInitializationException
checkDaoConfig
protected abstract void checkDaoConfig()
throws java.lang.IllegalArgumentException
- Abstract subclasses must override this to check their configuration.
Implementors should be marked as final
- Throws:
java.lang.IllegalArgumentException
- in case of illegal configuration
initDao
protected void initDao()
throws java.lang.Exception
- Concrete subclasses can override this for custom initialization behavior.
Gets called after population of this instance's bean properties.
- Throws:
java.lang.Exception
- if DAO initialization fails
(will be rethrown as a BeanInitializationException)- See Also:
BeanInitializationException