summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil ├śrbekk <orbekk@pvv.ntnu.no>2010-09-04 12:12:39 -0400
committerKjetil ├śrbekk <orbekk@pvv.ntnu.no>2010-09-04 12:12:39 -0400
commitdfc2776650b0b1e85f0d264da8ce1ce91ae85f42 (patch)
tree67c9f4b8e4b89822998c93c9e16e9f97532b0978
parent3e7c93a07bb995f7a6a93ff6edd0a11dec729fd6 (diff)
Remove DropData servlet.
-rw-r--r--src/lq/DropData.java35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/lq/DropData.java b/src/lq/DropData.java
deleted file mode 100644
index b46d3d1..0000000
--- a/src/lq/DropData.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package lq;
-
-import java.io.IOException;
-import java.util.List;
-import javax.jdo.PersistenceManager;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-public class DropData extends HttpServlet {
-
- @Override
- public void doGet(HttpServletRequest req, HttpServletResponse resp)
- throws IOException {
- PersistenceManager pm = PMF.get().getPersistenceManager();
- try {
- List<Quote> quotes = (List<Quote>) pm.newQuery(Quote.class).execute();
- for (Quote q : quotes) {
- pm.deletePersistent(q);
- }
- List<Vote> votes = (List<Vote>) pm.newQuery(Vote.class).execute();
- for (Vote v : votes) {
- pm.deletePersistent(v);
- }
- // List<Administrator> admins =
- // (List<Administrator>) pm.newQuery(Administrator.class).execute();
- // for (Administrator a : admins) {
- // pm.deletePersistent(a);
- // }
- }
- finally {
- pm.close();
- }
- }
-}