batchResult.setUpdateCounts(stmt.executeBatch());
MappedStatement ms = batchResult.getMappedStatement();
Object parameter = batchResult.getParameterObject();
KeyGenerator keyGenerator = ms.getKeyGenerator();
if (keyGenerator instanceof Jdbc3KeyGenerator) {
keyGenerator.processAfter(this, ms, stmt, parameter);
}
} catch (BatchUpdateException e) {
StringBuffer message = new StringBuffer();
message.append(batchResult.getMappedStatement().getId())
.append(" (batch index #")