private String rebuildSlonyQuery(String cmdType,String cmdData,String tableSchemaName) throws ReplicatorException {
  StringBuffer sb=new StringBuffer();
  if (cmdType.compareTo("I") == 0) {
    sb.append("INSERT INTO ");
    sb.append(tableSchemaName);
    sb.append(" ");
  }
 else   if (cmdType.compareTo("U") == 0) {
    sb.append("UPDATE ONLY ");
    sb.append(tableSchemaName);
    sb.append(" SET ");
  }
 else   if (cmdType.compareTo("D") == 0) {
    sb.append("DELETE FROM ONLY ");
    sb.append(tableSchemaName);
    sb.append(" WHERE ");
  }
 else   throw new ExtractorException("Unrecognized command type: " + cmdType);
  sb.append(cmdData);
  return sb.toString();
}

private String rebuildSlonyQuery ( String cmdType , String cmdData , String tableSchemaName ) throws ReplicatorException { StringBuffer sb = new StringBuffer ( ) ; if ( cmdType . compareTo ( "I" ) == 0 ) { sb . append ( "INSERT INTO " ) ; sb . append ( tableSchemaName ) ; sb . append ( " " ) ; } else if ( cmdType . compareTo ( "U" ) == 0 ) { sb . append ( "UPDATE ONLY " ) ; sb . append ( tableSchemaName ) ; sb . append ( " SET " ) ; } else if ( cmdType . compareTo ( "D" ) == 0 ) { sb . append ( "DELETE FROM ONLY " ) ; sb . append ( tableSchemaName ) ; sb . append ( " WHERE " ) ; } else throw new ExtractorException ( "Unrecognized command type: " + cmdType ) ; sb . append ( cmdData ) ; return sb . toString ( ) ; }
put back together all slony log ' s variables and build a valid sql query .
