Example usage for org.apache.ibatis.executor BatchResult getSql

List of usage examples for org.apache.ibatis.executor BatchResult getSql

Introduction

In this page you can find the example usage for org.apache.ibatis.executor BatchResult getSql.

Prototype

public String getSql() 

Source Link

Usage

From source file:org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.java

License:Apache License

public void printBatchResults(List<BatchResult> results) {
    if (results.size() > 0) {
        StringBuilder sb = new StringBuilder();
        sb.append("Batch summary:\n");
        for (int i = 0; i < results.size(); i++) {
            BatchResult result = results.get(i);
            sb.append("Result ").append(i).append(":\t");
            sb.append(result.getSql().replaceAll("\n", "").replaceAll("\\s+", " ")).append("\t");
            sb.append("Update counts: ").append(Arrays.toString(result.getUpdateCounts())).append("\n");
        }/*from  www . ja v  a  2s .  c o  m*/
        logDebug("082", sb.toString());
    }
}