protected StringBuffer constructStatement(RowChangeData.ActionType action,String schemaName,String tableName,ArrayList<OneRowChange.ColumnSpec> columns,ArrayList<OneRowChange.ColumnSpec> keys,ArrayList<OneRowChange.ColumnVal> keyValues,ArrayList<OneRowChange.ColumnVal> colValues){
  StringBuffer stmt=new StringBuffer();
  if (action == RowChangeData.ActionType.INSERT) {
    stmt.append("INSERT INTO ");
    stmt.append(conn.getDatabaseObjectName(schemaName) + "." + conn.getDatabaseObjectName(tableName));
    stmt.append(" ( ");
    printColumnSpec(stmt,columns,null,colValues,PrintMode.NAMES_ONLY," , ");
    stmt.append(" ) ");
    stmt.append(" VALUES ( ");
    printColumnSpec(stmt,columns,null,colValues,PrintMode.PLACE_HOLDER," , ");
    stmt.append(" ) ");
  }
 else   if (action == RowChangeData.ActionType.UPDATE) {
    stmt.append("UPDATE ");
    stmt.append(conn.getDatabaseObjectName(schemaName) + "." + conn.getDatabaseObjectName(tableName));
    stmt.append(" SET ");
    printColumnSpec(stmt,columns,null,colValues,PrintMode.ASSIGNMENT," , ");
    stmt.append(" WHERE ");
    printColumnSpec(stmt,keys,keyValues,colValues,PrintMode.ASSIGNMENT," AND ");
  }
 else   if (action == RowChangeData.ActionType.DELETE) {
    stmt.append("DELETE FROM ");
    stmt.append(conn.getDatabaseObjectName(schemaName) + "." + conn.getDatabaseObjectName(tableName));
    stmt.append(" WHERE ");
    printColumnSpec(stmt,keys,keyValues,colValues,PrintMode.ASSIGNMENT," AND ");
  }
  return stmt;
}

protected StringBuffer constructStatement ( RowChangeData . ActionType action , String schemaName , String tableName , ArrayList < OneRowChange . ColumnSpec > columns , ArrayList < OneRowChange . ColumnSpec > keys , ArrayList < OneRowChange . ColumnVal > keyValues , ArrayList < OneRowChange . ColumnVal > colValues ) { StringBuffer stmt = new StringBuffer ( ) ; if ( action == RowChangeData . ActionType . INSERT ) { stmt . append ( "INSERT INTO " ) ; stmt . append ( conn . getDatabaseObjectName ( schemaName ) + "." + conn . getDatabaseObjectName ( tableName ) ) ; stmt . append ( " ( " ) ; printColumnSpec ( stmt , columns , null , colValues , PrintMode . NAMES_ONLY , " , " ) ; stmt . append ( " ) " ) ; stmt . append ( " VALUES ( " ) ; printColumnSpec ( stmt , columns , null , colValues , PrintMode . PLACE_HOLDER , " , " ) ; stmt . append ( " ) " ) ; } else if ( action == RowChangeData . ActionType . UPDATE ) { stmt . append ( "UPDATE " ) ; stmt . append ( conn . getDatabaseObjectName ( schemaName ) + "." + conn . getDatabaseObjectName ( tableName ) ) ; stmt . append ( " SET " ) ; printColumnSpec ( stmt , columns , null , colValues , PrintMode . ASSIGNMENT , " , " ) ; stmt . append ( " WHERE " ) ; printColumnSpec ( stmt , keys , keyValues , colValues , PrintMode . ASSIGNMENT , " AND " ) ; } else if ( action == RowChangeData . ActionType . DELETE ) { stmt . append ( "DELETE FROM " ) ; stmt . append ( conn . getDatabaseObjectName ( schemaName ) + "." + conn . getDatabaseObjectName ( tableName ) ) ; stmt . append ( " WHERE " ) ; printColumnSpec ( stmt , keys , keyValues , colValues , PrintMode . ASSIGNMENT , " AND " ) ; } return stmt ; }
constructs a sql statement template later used for prepared statement .
