private StringBuffer prepareOptimizedInsertStatement(OneRowChange oneRowChange){
  StringBuffer stmt;
  stmt=new StringBuffer();
  stmt.append("INSERT INTO ");
  stmt.append(conn.getDatabaseObjectName(oneRowChange.getSchemaName()) + "." + conn.getDatabaseObjectName(oneRowChange.getTableName()));
  stmt.append(" ( ");
  printColumnSpec(stmt,oneRowChange.getColumnSpec(),null,null,PrintMode.NAMES_ONLY,", ");
  stmt.append(") VALUES (");
  boolean firstRow=true;
  for (  ArrayList<ColumnVal> oneRowValues : oneRowChange.getColumnValues()) {
    if (firstRow) {
      firstRow=false;
    }
 else     stmt.append(", (");
    printColumnSpec(stmt,oneRowChange.getColumnSpec(),null,oneRowValues,PrintMode.PLACE_HOLDER," , ");
    stmt.append(")");
  }
  return stmt;
}

private StringBuffer prepareOptimizedInsertStatement ( OneRowChange oneRowChange ) { StringBuffer stmt ; stmt = new StringBuffer ( ) ; stmt . append ( "INSERT INTO " ) ; stmt . append ( conn . getDatabaseObjectName ( oneRowChange . getSchemaName ( ) ) + "." + conn . getDatabaseObjectName ( oneRowChange . getTableName ( ) ) ) ; stmt . append ( " ( " ) ; printColumnSpec ( stmt , oneRowChange . getColumnSpec ( ) , null , null , PrintMode . NAMES_ONLY , ", " ) ; stmt . append ( ") VALUES (" ) ; boolean firstRow = true ; for ( ArrayList < ColumnVal > oneRowValues : oneRowChange . getColumnValues ( ) ) { if ( firstRow ) { firstRow = false ; } else stmt . append ( ", (" ) ; printColumnSpec ( stmt , oneRowChange . getColumnSpec ( ) , null , oneRowValues , PrintMode . PLACE_HOLDER , " , " ) ; stmt . append ( ")" ) ; } return stmt ; }
build prepare statement for optimized inserts : < br > insert into table1 values ( . . . ) ; insert into table1 values ( . . . ) ; . . . would translate into < br > insert into table1 values ( . . . ) , ( . . . ) , . . .
