From fd3f2cbdaa1e3c160727c3cf09ef03d06174c114 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 18 Sep 2008 21:59:23 +0000 Subject: Series: Removed Series component Refs #57 --- .../com/fourisland/instadisc/Database/Wrapper.java | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'client/trunk/src') 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 { } } } + + public static void deleteItem(Integer id) { + synchronized (item) + { + try + { + Transaction t = e.beginTransaction(null, null); + + try + { + item.delete(t, id); + + t.commit(); + } catch (Exception ex) + { + t.abort(); + } + } catch (DatabaseException ex) + { + Logger.getLogger(Wrapper.class.getName()).log(Level.SEVERE, null, ex); + } + } + } } -- cgit 1.4.1