Update of /cvsroot/springframework/spring/tiger/src/org/springframework/jdbc/core/simple
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32009/tiger/src/org/springframework/jdbc/core/simple
Modified Files:
SimpleJdbcDaoSupport.java
Log Message:
initialize specialized template in overridden "checkDaoConfig()" method
Index: SimpleJdbcDaoSupport.java
===================================================================
RCS file: /cvsroot/springframework/spring/tiger/src/org/springframework/jdbc/core/simple/SimpleJdbcDaoSupport.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SimpleJdbcDaoSupport.java 7 Dec 2005 04:15:49 -0000 1.1
--- SimpleJdbcDaoSupport.java 20 Apr 2006 13:43:33 -0000 1.2
***************
*** 1,4 ****
/*
! * Copyright 2002-2005 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
--- 1,4 ----
/*
! * Copyright 2002-2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
***************
*** 17,28 ****
package org.springframework.jdbc.core.simple;
- import javax.sql.DataSource;
-
- import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
/**
! * Extension of JdbcDaoSupport to expose a SimpleJdbcTemplate.
! * Only usable with Java 5 and above.
*
* @author Rod Johnson
--- 17,25 ----
package org.springframework.jdbc.core.simple;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
/**
! * Extension of JdbcDaoSupport that exposes a SimpleJdbcTemplate as well.
! * Only usable on Java 5 and above.
*
* @author Rod Johnson
***************
*** 37,50 ****
/**
! * Overridden to not only create a JdbcTemplate but also a SimpleJdbcTemplate.
*/
! protected JdbcTemplate createJdbcTemplate(DataSource dataSource) {
! JdbcTemplate jt = new JdbcTemplate(dataSource);
! this.simpleJdbcTemplate = new SimpleJdbcTemplate(jt);
! return jt;
}
!
/**
! * Return a SimpleJdbcTemplate wrapping the current JdbcTemplate.
*/
public SimpleJdbcTemplate getSimpleJdbcTemplate() {
--- 34,47 ----
/**
! * Overridden to create a SimpleJdbcTemplate based on the configured
! * JdbcTemplate.
*/
! protected void checkDaoConfig() {
! super.checkDaoConfig();
! this.simpleJdbcTemplate = new SimpleJdbcTemplate(getJdbcTemplate());
}
!
/**
! * Return a SimpleJdbcTemplate wrapping the configured JdbcTemplate.
*/
public SimpleJdbcTemplate getSimpleJdbcTemplate() {
|