From: Juergen H. <jho...@us...> - 2006-04-21 00:14:24
|
Update of /cvsroot/springframework/spring/src/org/springframework/jdbc/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19629/src/org/springframework/jdbc/core Modified Files: Tag: mbranch-1-2 JdbcTemplate.java Log Message: backported fixes and enhancements from 2.0 M4 (HEAD) Index: JdbcTemplate.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/jdbc/core/JdbcTemplate.java,v retrieving revision 1.106.2.1 retrieving revision 1.106.2.2 diff -C2 -d -r1.106.2.1 -r1.106.2.2 *** JdbcTemplate.java 23 Dec 2005 13:50:11 -0000 1.106.2.1 --- JdbcTemplate.java 21 Apr 2006 00:13:48 -0000 1.106.2.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"); *************** *** 518,522 **** * @throws DataAccessException if there is any problem */ ! protected Object query( PreparedStatementCreator psc, final PreparedStatementSetter pss, final ResultSetExtractor rse) throws DataAccessException { --- 518,522 ---- * @throws DataAccessException if there is any problem */ ! public Object query( PreparedStatementCreator psc, final PreparedStatementSetter pss, final ResultSetExtractor rse) throws DataAccessException { *************** *** 658,667 **** } ! public List queryForList(String sql, Object[] args, int[] argTypes, Class elementType) ! throws DataAccessException { return query(sql, args, argTypes, getSingleColumnRowMapper(elementType)); } ! public List queryForList(String sql, final Object[] args, Class elementType) throws DataAccessException { return query(sql, args, getSingleColumnRowMapper(elementType)); } --- 658,666 ---- } ! public List queryForList(String sql, Object[] args, int[] argTypes, Class elementType) throws DataAccessException { return query(sql, args, argTypes, getSingleColumnRowMapper(elementType)); } ! public List queryForList(String sql, Object[] args, Class elementType) throws DataAccessException { return query(sql, args, getSingleColumnRowMapper(elementType)); } *************** *** 671,683 **** } ! public List queryForList(String sql, final Object[] args) throws DataAccessException { return query(sql, args, getColumnMapRowMapper()); } ! public SqlRowSet queryForRowSet(String sql, final Object[] args, int[] argTypes) throws DataAccessException { return (SqlRowSet) query(sql, args, argTypes, new SqlRowSetResultSetExtractor()); } ! public SqlRowSet queryForRowSet(String sql, final Object[] args) throws DataAccessException { return (SqlRowSet) query(sql, args, new SqlRowSetResultSetExtractor()); } --- 670,682 ---- } ! public List queryForList(String sql, Object[] args) throws DataAccessException { return query(sql, args, getColumnMapRowMapper()); } ! public SqlRowSet queryForRowSet(String sql, Object[] args, int[] argTypes) throws DataAccessException { return (SqlRowSet) query(sql, args, argTypes, new SqlRowSetResultSetExtractor()); } ! public SqlRowSet queryForRowSet(String sql, Object[] args) throws DataAccessException { return (SqlRowSet) query(sql, args, new SqlRowSetResultSetExtractor()); } *************** *** 751,763 **** } ! public int update(String sql, final PreparedStatementSetter pss) throws DataAccessException { return update(new SimplePreparedStatementCreator(sql), pss); } ! public int update(String sql, final Object[] args, final int[] argTypes) throws DataAccessException { return update(sql, new ArgTypePreparedStatementSetter(args, argTypes)); } ! public int update(String sql, final Object[] args) throws DataAccessException { return update(sql, new ArgPreparedStatementSetter(args)); } --- 750,762 ---- } ! public int update(String sql, PreparedStatementSetter pss) throws DataAccessException { return update(new SimplePreparedStatementCreator(sql), pss); } ! public int update(String sql, Object[] args, int[] argTypes) throws DataAccessException { return update(sql, new ArgTypePreparedStatementSetter(args, argTypes)); } ! public int update(String sql, Object[] args) throws DataAccessException { return update(sql, new ArgPreparedStatementSetter(args)); } *************** *** 849,853 **** } ! public Object execute(final String callString, CallableStatementCallback action) throws DataAccessException { return execute(new SimpleCallableStatementCreator(callString), action); } --- 848,852 ---- } ! public Object execute(String callString, CallableStatementCallback action) throws DataAccessException { return execute(new SimpleCallableStatementCreator(callString), action); } *************** *** 1041,1045 **** if (isIgnoreWarnings()) { if (logger.isWarnEnabled()) { ! logger.warn("SQLWarning ignored: " + warning); } } --- 1040,1045 ---- if (isIgnoreWarnings()) { if (logger.isWarnEnabled()) { ! logger.warn("SQLWarning ignored: SQL state '" + warning.getSQLState() + "', error code '" + ! warning.getErrorCode() + "', message [" + warning.getMessage() + "]"); } } |