extracted creation of new ArgPreparedStatementSetter and ArgTypePreparedStatementSetter into protected methods to allow sub-classes to override (SPR-3977)

This commit is contained in:
Thomas Risberg 2009-11-12 19:39:39 +00:00
parent 5491a63f2e
commit b88db7a594
1 changed files with 28 additions and 6 deletions

View File

@ -1232,6 +1232,28 @@ 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