org.springframework.jdbc.core.support
Class JdbcDaoSupport


public abstract class JdbcDaoSupport
implements InitializingBean

Convenient super class for JDBC data access objects. Requires a DataSource to be set, providing a JdbcTemplate based on it to subclasses.

This base class is mainly intended for JdbcTemplate usage but can also be used when working with DataSourceUtils directly or with org.springframework.jdbc.object classes.

Author:
Juergen Hoeller
Since: 28.07.2003
See Also: setDataSource(javax.sql.DataSource), JdbcTemplate, DataSourceUtils

Method Summary
 final voidafterPropertiesSet()
           
 final voidsetDataSource(DataSource dataSource)
          Set the JDBC DataSource to be used by this DAO.
 final voidsetJdbcTemplate(JdbcTemplate jdbcTemplate)
          Set the JdbcTemplate for this DAO explicitly, as an alternative to specifying a DataSource.

Method Detail

afterPropertiesSet

public final void afterPropertiesSet()
throws java.lang.Exception

setDataSource

public final void setDataSource(DataSource dataSource)
Set the JDBC DataSource to be used by this DAO.

setJdbcTemplate

public final void setJdbcTemplate(JdbcTemplate jdbcTemplate)
Set the JdbcTemplate for this DAO explicitly, as an alternative to specifying a DataSource.

Association Links

to Class org.springframework.jdbc.core.JdbcTemplate