From 4dc4ce32758d916a51a5953563be56a21531c9f2 Mon Sep 17 00:00:00 2001 From: Thomas Risberg Date: Wed, 25 Mar 2009 12:14:55 +0000 Subject: [PATCH] changed MapSqlParameterSource to SqlParameterSource in executeFunction and executeObject methods for SimpleJdbcCall (SPR-5570) --- .../springframework/jdbc/core/simple/SimpleJdbcCall.java | 9 ++++----- .../jdbc/core/simple/SimpleJdbcCallOperations.java | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java b/org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java index c9f7b40a75..631e10ad26 100644 --- a/org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java +++ b/org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java @@ -25,7 +25,6 @@ import javax.sql.DataSource; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.SqlParameter; -import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; import org.springframework.jdbc.core.namedparam.SqlParameterSource; /** @@ -133,22 +132,22 @@ public class SimpleJdbcCall extends AbstractJdbcCall implements SimpleJdbcCallOp @SuppressWarnings("unchecked") - public T executeFunction(Class returnType, Map args) { + public T executeFunction(Class returnType, Map args) { return (T) doExecute(args).get(getScalarOutParameterName()); } @SuppressWarnings("unchecked") - public T executeFunction(Class returnType, MapSqlParameterSource args) { + public T executeFunction(Class returnType, SqlParameterSource args) { return (T) doExecute(args).get(getScalarOutParameterName()); } @SuppressWarnings("unchecked") - public T executeObject(Class returnType, Map args) { + public T executeObject(Class returnType, Map args) { return (T) doExecute(args).get(getScalarOutParameterName()); } @SuppressWarnings("unchecked") - public T executeObject(Class returnType, MapSqlParameterSource args) { + public T executeObject(Class returnType, SqlParameterSource args) { return (T) doExecute(args).get(getScalarOutParameterName()); } diff --git a/org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCallOperations.java b/org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCallOperations.java index 769b50befa..eec99c04e7 100644 --- a/org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCallOperations.java +++ b/org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCallOperations.java @@ -19,7 +19,6 @@ package org.springframework.jdbc.core.simple; import java.util.Map; import org.springframework.jdbc.core.SqlParameter; -import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; import org.springframework.jdbc.core.namedparam.SqlParameterSource; /** @@ -107,14 +106,14 @@ public interface SimpleJdbcCallOperations { * @param returnType the type of the value to return * @param args Map containing the parameter values to be used in the call. */ - T executeFunction(Class returnType, Map args); + T executeFunction(Class returnType, Map args); /** * Execute the stored function and return the results obtained as an Object of the specified return type. * @param returnType the type of the value to return * @param args MapSqlParameterSource containing the parameter values to be used in the call. */ - T executeFunction(Class returnType, MapSqlParameterSource args); + T executeFunction(Class returnType, SqlParameterSource args); /** * Execute the stored procedure and return the single out parameter as an Object of the specified return type. @@ -123,7 +122,7 @@ public interface SimpleJdbcCallOperations { * @param returnType the type of the value to return * @param args Map containing the parameter values to be used in the call. */ - T executeObject(Class returnType, Map args); + T executeObject(Class returnType, Map args); /** * Execute the stored procedure and return the single out parameter as an Object of the specified return type. @@ -132,7 +131,7 @@ public interface SimpleJdbcCallOperations { * @param returnType the type of the value to return * @param args MapSqlParameterSource containing the parameter values to be used in the call. */ - T executeObject(Class returnType, MapSqlParameterSource args); + T executeObject(Class returnType, SqlParameterSource args); /** * Execute the stored procedure and return a map of output params, keyed by name as in parameter declarations..