about summary refs log tree commit diff stats
path: root/client/trunk/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/trunk/src')
-rw-r--r--client/trunk/src/com/fourisland/instadisc/Database/Wrapper.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/client/trunk/src/com/fourisland/instadisc/Database/Wrapper.java b/client/trunk/src/com/fourisland/instadisc/Database/Wrapper.java index 1448893..c7da7a2 100644 --- a/client/trunk/src/com/fourisland/instadisc/Database/Wrapper.java +++ b/client/trunk/src/com/fourisland/instadisc/Database/Wrapper.java
@@ -467,4 +467,27 @@ public class Wrapper {
467 } 467 }
468 } 468 }
469 } 469 }
470
471 public static void deleteItem(Integer id) {
472 synchronized (item)
473 {
474 try
475 {
476 Transaction t = e.beginTransaction(null, null);
477
478 try
479 {
480 item.delete(t, id);
481
482 t.commit();
483 } catch (Exception ex)
484 {
485 t.abort();
486 }
487 } catch (DatabaseException ex)
488 {
489 Logger.getLogger(Wrapper.class.getName()).log(Level.SEVERE, null, ex);
490 }
491 }
492 }
470} 493}