public abstract class

DaoSupport

extends Object
implements InitializingBean
java.lang.Object
   ↳ org.springframework.dao.support.DaoSupport
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Generic base class for DAOs, defining template methods for DAO initialization.

Extended by Spring's specific DAO support classes, such as: JdbcDaoSupport, JdoDaoSupport, etc.

Summary

Fields
protected final Log logger Logger available to subclasses
Public Constructors
DaoSupport()
Public Methods
final void afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
Protected Methods
abstract void checkDaoConfig()
Abstract subclasses must override this to check their configuration.
void initDao()
Concrete subclasses can override this for custom initialization behavior.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.beans.factory.InitializingBean

Fields

protected final Log logger

Logger available to subclasses

Public Constructors

public DaoSupport ()

Public Methods

public final void afterPropertiesSet ()

Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).

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.

Protected Methods

protected abstract void checkDaoConfig ()

Abstract subclasses must override this to check their configuration.

Implementors should be marked as final

Throws
IllegalArgumentException in case of illegal configuration

protected void initDao ()

Concrete subclasses can override this for custom initialization behavior. Gets called after population of this instance's bean properties.

Throws
Exception if DAO initialization fails (will be rethrown as a BeanInitializationException)