Project

General

Profile

« Previous | Next » 

Revision 1072

Added by Jing Tao almost 22 years ago

In writeDocumentToDB method, during insert action, rev value can be assigned too. It is useful for replication.

View differences:

DocumentImpl.java
1192 1192
                "INSERT INTO xml_documents " +
1193 1193
                "(docid, rootnodeid, docname, doctype, " + 
1194 1194
                "user_owner, user_updated, date_created, date_updated, " + 
1195
                "public_access, catalog_id, server_location) " +
1195
                "public_access, catalog_id, server_location, rev) " +
1196 1196
                "VALUES (?, ?, ?, ?, ?, ?, " + sysdate + ", " + sysdate + 
1197
                ", ?, ?, ?)");
1197
                ", ?, ?, ?, ?)");
1198 1198
        //note that the server_location is set to 1. 
1199 1199
        //this means that "localhost" in the xml_replication table must
1200 1200
        //always be the first entry!!!!!
......
1217 1217
        }*/
1218 1218
        pstmt.setString(8, catalogid);
1219 1219
        pstmt.setInt(9, serverCode);
1220
        pstmt.setInt(10, Integer.parseInt(updatedVersion)); 
1220 1221
      } else if (action.equals("UPDATE")) {
1221 1222

  
1222
        // Save the old document entry in a backup table
1223
        // Save the old document publicaccessentry in a backup table
1223 1224
        DocumentImpl.archiveDocRevision( conn, docid, user );
1224 1225
        DocumentImpl thisdoc = new DocumentImpl(conn, docid);
1225 1226
        int thisrev = thisdoc.getRev();

Also available in: Unified diff