{
Statement statement = statementFactory.create(connection, bulkQuery.getQueryTemplates().get(0));
try
{
BulkQueryLogger queryLogger = queryLoggerFactory.createBulkQueryLogger(logger);
for (QueryTemplate queryTemplate : bulkQuery.getQueryTemplates())
{
String sql = queryTemplate.getSqlText();
statement.addBatch(sql);
queryLogger.addQuery(sql);
}
queryLogger.logQuery();
return statement.executeBatch();
}
finally
{