// Execute one batch statement for each identical SQL statement. Every
// SQL statement may have several queries with different bind values.
// The order is preserved as much as possible
List<Integer> result = new ArrayList<Integer>();
for (Entry<String, List<Query>> entry : queries.entrySet()) {
BatchBindStep batch = create.batch(entry.getValue().get(0));
for (Query query : entry.getValue()) {
batch.bind(query.getBindValues().toArray());
}
int[] array = batch.execute();
for (int i : array) {
result.add(i);
}
}