title: spring jdbcTemplate batch update return records inserted
body: <pre><code>public void insertBatch(final List&lt;Customer&gt; customers){
  
       String sql = "INSERT INTO CUSTOMER " +
          "(ID, NAME, AGE) VALUES (MY_SEQUENCE.NEXTVAL, ?, ?)";
  
        getJdbcTemplate().batchUpdate(sql, new BatchPreparedStatementSetter() {
  
  
      @Override
      public void setValues(PreparedStatement ps, int i) throws SQLException {
          Customer customer = customers.get(i);
          ps.setString(1, customer.getName());
          ps.setInt(2, customer.getAge() );
      }
  
      @Override
      public int getBatchSize() {
          return customers.size();
      }
    });
  }
  </code></pre>
  
  <p>Is there any way where I can get all the records inserted in this batch with primary key (ID) value as well in the above method itself. Or do I need to write a separate method to get the data.?
  I am using oracle DB.</p>