Browse Source

newArg(Type)PreparedStatementSetter declares PreparedStatementSetter interface as return type (SPR-6897)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3036 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Juergen Hoeller 16 years ago
parent
commit
499a4ffdeb
  1. 43
      org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java

43
org.springframework.jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java

@ -1222,6 +1222,27 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { @@ -1222,6 +1222,27 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
DataSourceUtils.applyTimeout(stmt, getDataSource(), getQueryTimeout());
}
/**
* Create a new ArgPreparedStatementSetter using the args passed in. This method allows the
* creation to be overridden by sub-classes.
* @param args object array woth arguments
* @return the new PreparedStatementSetter
*/
protected PreparedStatementSetter newArgPreparedStatementSetter(Object[] args) {
return new ArgPreparedStatementSetter(args);
}
/**
* Create a new ArgTypePreparedStatementSetter using the args and argTypes passed in.
* This method allows the creation to be overridden by sub-classes.
* @param args object array woth arguments
* @param argTypes int array of SQLTypes for arguments
* @return the new PreparedStatementSetter
*/
protected PreparedStatementSetter newArgTypePreparedStatementSetter(Object[] args, int[] argTypes) {
return new ArgTypePreparedStatementSetter(args, argTypes);
}
/**
* Throw an SQLWarningException if we're not ignoring warnings,
* else log the warnings (at debug level).
@ -1257,28 +1278,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { @@ -1257,28 +1278,6 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
}
}
/**
* Create a new ArgPreparedStatementSetter using the args passed in. This method allows the
* creation to be overridden by sub-classes.
* @param args object array woth arguments
* @return the new ArgPreparedStatementSetter
*/
protected ArgPreparedStatementSetter newArgPreparedStatementSetter(Object[] args) {
return new ArgPreparedStatementSetter(args);
}
/**
* Create a new ArgTypePreparedStatementSetter using the args and argTypes passed in.
* This method allows the creation to be overridden by sub-classes.
* @param args object array woth arguments
* @param argTypes int array of SQLTypes for arguments
* @return the new ArgTypePreparedStatementSetter
*/
protected ArgTypePreparedStatementSetter newArgTypePreparedStatementSetter(Object[] args, int[] argTypes) {
return new ArgTypePreparedStatementSetter(args, argTypes);
}
/**
* Determine SQL from potential provider object.
* @param sqlProvider object that's potentially a SqlProvider

Loading…
Cancel
Save