public abstract class DaoSupport extends java.lang.Object implements InitializingBean
Extended by Spring's specific DAO support classes, such as: JdbcDaoSupport, JdoDaoSupport, etc.
JdbcDaoSupport
,
org.springframework.orm.jdo.support.JdoDaoSupport
Modifier and Type | Field and Description |
---|---|
protected Log |
logger
Logger available to subclasses
|
Constructor and Description |
---|
DaoSupport() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
|
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.
|
public final void afterPropertiesSet() throws java.lang.IllegalArgumentException, BeanInitializationException
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.IllegalArgumentException
BeanInitializationException
protected abstract void checkDaoConfig() throws java.lang.IllegalArgumentException
Implementors should be marked as final
if concrete subclasses
are not supposed to override this template method themselves.
java.lang.IllegalArgumentException
- in case of illegal configurationprotected void initDao() throws java.lang.Exception
java.lang.Exception
- if DAO initialization fails
(will be rethrown as a BeanInitializationException)BeanInitializationException