Revision 421
Added by bojilova over 23 years ago
DocumentImpl.java | ||
---|---|---|
354 | 354 |
throws IOException, SQLException, |
355 | 355 |
ClassNotFoundException, AccessionNumberException { |
356 | 356 |
|
357 |
String newdocid = AccessionNumber.generate(docid, "DELETE"); |
|
357 |
AccessionNumber ac = new AccessionNumber(); |
|
358 |
String newdocid = ac.generate(docid, "DELETE"); |
|
358 | 359 |
|
359 | 360 |
conn.setAutoCommit(false); |
360 | 361 |
// Copy the record to the xml_revisions table |
... | ... | |
375 | 376 |
PreparedStatement pstmt = null; |
376 | 377 |
|
377 | 378 |
if (action.equals("INSERT")) { |
378 |
this.docid = AccessionNumber.generate(docid, "INSERT"); |
|
379 |
AccessionNumber ac = new AccessionNumber(); |
|
380 |
this.docid = ac.generate(docid, "INSERT"); |
|
379 | 381 |
pstmt = conn.prepareStatement( |
380 | 382 |
"INSERT INTO xml_documents " + |
381 | 383 |
"(docid, rootnodeid, docname, doctype, " + |
... | ... | |
389 | 391 |
} else if (action.equals("UPDATE")) { |
390 | 392 |
|
391 | 393 |
// Determine if the docid is OK for an UPDATE |
392 |
this.docid = AccessionNumber.generate(docid, "UPDATE"); |
|
394 |
AccessionNumber ac = new AccessionNumber(); |
|
395 |
this.docid = ac.generate(docid, "UPDATE"); |
|
393 | 396 |
|
394 | 397 |
// Save the old document entry in a backup table |
395 | 398 |
DocumentImpl.archiveDocRevision( conn, docid ); |
Also available in: Unified diff
cleared static methods in AccessionNumber classes for fixing bug found
when multiple requests to the servlet at a time.