com.ibatis.dao.client.template
Class JdbcDaoTemplate

java.lang.Object
  extended bycom.ibatis.dao.client.template.DaoTemplate
      extended bycom.ibatis.dao.client.template.JdbcDaoTemplate
All Implemented Interfaces:
Dao

public abstract class JdbcDaoTemplate
extends DaoTemplate

A DaoTemplate for JDBC implementations that provides a convenient method to access the JDBC Connection.

Use this template for both JDBC and JTA transaction managers. It can also be used for any transaction manager that supports normal JDBC connections, including iBATIS SQL Maps and Hibernate.


Field Summary
 
Fields inherited from class com.ibatis.dao.client.template.DaoTemplate
daoManager
 
Constructor Summary
JdbcDaoTemplate(DaoManager daoManager)
          The DaoManager that manages this Dao instance will be passed in as the parameter to this constructor automatically upon instantiation.
 
Method Summary
protected  java.sql.Connection getConnection()
          Gets the JDBC Connection associated with the current DaoTransaction that this Dao is working under.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcDaoTemplate

public JdbcDaoTemplate(DaoManager daoManager)
The DaoManager that manages this Dao instance will be passed in as the parameter to this constructor automatically upon instantiation.

Parameters:
daoManager -
Method Detail

getConnection

protected java.sql.Connection getConnection()
Gets the JDBC Connection associated with the current DaoTransaction that this Dao is working under.

Returns:
A JDBC Connection instance.