Revision 5120
Added by daigle about 15 years ago
src/edu/ucsb/nceas/metacat/accesscontrol/XMLAccessAccess.java | ||
---|---|---|
371 | 371 |
// check out DBConnection |
372 | 372 |
conn = DBConnectionPool.getDBConnection("XMLAccessAccess.insertXMLAccess"); |
373 | 373 |
serialNumber = conn.getCheckOutSerialNumber(); |
374 |
|
|
374 | 375 |
String sql = "INSERT INTO xml_access " + |
375 | 376 |
"(docid, principal_name, permission, perm_type, perm_order ) " + |
376 | 377 |
"VALUES (?,?,?,?,?)"; |
... | ... | |
431 | 432 |
// check out DBConnection |
432 | 433 |
conn = DBConnectionPool.getDBConnection("XMLAccessAccess.updateXMLAccessPermission"); |
433 | 434 |
serialNumber = conn.getCheckOutSerialNumber(); |
435 |
|
|
434 | 436 |
String sql = "UPDATE xml_access SET permission = ?" + |
435 | 437 |
"WHERE docid = ? AND principal_name = ?"; |
436 | 438 |
pstmt = conn.prepareStatement(sql); |
... | ... | |
524 | 526 |
try { |
525 | 527 |
// check out DBConnection |
526 | 528 |
conn = DBConnectionPool.getDBConnection("XMLAccessAccess.deleteXMLAccessForDoc"); |
529 |
serialNumber = conn.getCheckOutSerialNumber(); |
|
530 |
|
|
527 | 531 |
String sql = "DELETE FROM xml_access WHERE docid = ?"; |
528 | 532 |
pstmt = conn.prepareStatement(sql); |
529 | 533 |
|
... | ... | |
569 | 573 |
try { |
570 | 574 |
// check out DBConnection |
571 | 575 |
conn = DBConnectionPool.getDBConnection("XMLAccessAccess.deleteXMLAccessForPrincipal"); |
576 |
serialNumber = conn.getCheckOutSerialNumber(); |
|
577 |
|
|
572 | 578 |
String sql = "DELETE FROM xml_access WHERE docid = ? AND principal_name = ?"; |
573 | 579 |
pstmt = conn.prepareStatement(sql); |
574 | 580 |
|
... | ... | |
616 | 622 |
try { |
617 | 623 |
// check out DBConnection |
618 | 624 |
conn = DBConnectionPool.getDBConnection("XMLAccessAccess.permOrderConflict"); |
625 |
serialNumber = conn.getCheckOutSerialNumber(); |
|
626 |
|
|
619 | 627 |
String sql = "SELECT * FROM xml_access WHERE docid = ? AND perm_order != ?"; |
620 | 628 |
pstmt = conn.prepareStatement(sql); |
621 | 629 |
|
... | ... | |
679 | 687 |
try { |
680 | 688 |
// check out DBConnection |
681 | 689 |
conn = DBConnectionPool.getDBConnection("XMLAccessAccess.deleteXMLAccessForPrincipal"); |
690 |
serialNumber = conn.getCheckOutSerialNumber(); |
|
691 |
|
|
682 | 692 |
String sql = "DELETE FROM xml_access WHERE docid = ? AND principal_name = ? " + |
683 | 693 |
"AND perm_type = ? AND perm_order = ?"; |
684 | 694 |
pstmt = conn.prepareStatement(sql); |
Also available in: Unified diff
add connection serial number where it was missing.