@Override public <T> int[][] batchUpdate( String sql, Collection<T> batchArgs, int batchSize, ParameterizedPreparedStatementSetter<T> ppss) { if (this.logger.isDebugEnabled()) { this.logger.debug("Executing SQL batch update [" + sql + "] with a batch size of " + batchSize); } try { return execute(sql, new ParameterizedBatchingPreparedStatementCallback<>(ppss, batchSize, batchArgs)); } finally { if (ppss instanceof ParameterDisposer) { ((ParameterDisposer) ppss).cleanupParameters(); } } }
@Override public int[] batchUpdate(String sql, final BatchPreparedStatementSetter pss) throws DataAccessException { if (this.logger.isDebugEnabled()) { this.logger.debug("Executing SQL batch update [" + sql + "]"); } try { return execute(sql, new BatchingPreparedStatementCallback(this.sendBatchSize, pss)); } finally { if (pss instanceof ParameterDisposer) { ((ParameterDisposer) pss).cleanupParameters(); } } }