Java 类org.springframework.jdbc.core.ParameterDisposer 实例源码

项目:spring-jdbc-oracle    文件:OracleJdbcTemplate.java   
@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();
    }
  }
}
项目:spring-jdbc-oracle    文件:OracleJdbcTemplate.java   
@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();
    }
  }
}