What is BatchPreparedStatementSetter?
- Updating more than one row at a time, the BatchPreparedStatementSetter is used. This interface has setValues() and getBatchSize() exceptions. The getBatchSize() method is used to specify the number of statements to create.
Explain about BatchPreparedStatementSetter.
- If the user what to update more than one row at a shot then he can go for BatchPreparedStatementSetter. This interface provides two methods:
- setValues(PreparedStatement ps, int i) throws SQLException;
- int getBatchSize();
- The getBatchSize() tells the JdbcTemplate class how many statements to create. And this also determines how many times setValues() will be called.