Examples of BatchPreparedStatementSetter


Examples of org.springframework.jdbc.core.BatchPreparedStatementSetter

    for (Map.Entry<JdbcTemplate, Map<String, List<RowBasedReplicationContext>>> e0 : sortedContexts.entrySet()) {
      JdbcTemplate jt = e0.getKey();
      for (Map.Entry<String, List<RowBasedReplicationContext>> e : e0.getValue().entrySet()) {
        final List<RowBasedReplicationContext> endContexts = e.getValue();
        BatchPreparedStatementSetter setter = new BatchPreparedStatementSetter() {
          public int getBatchSize() {
            return endContexts.size();
          }
          public void setValues(PreparedStatement ps, int i) throws SQLException {
            RowBasedReplicationContext context = endContexts.get(i);
View Full Code Here

Examples of org.springframework.jdbc.core.BatchPreparedStatementSetter

  }

  @Override
  protected void batchOutput(String sql, final Object[][] batchRows) {
    final ColumnInfo[] columnInfos = super.columnInfos;
    jdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter(){
      @Override
      public void setValues(PreparedStatement ps, int i) throws SQLException {
        Object[] row = batchRows[i];
        for (int k=0; k < columnInfos.length; k++) {
          Object value = row[k];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.