changeset 717:03e26dbdfd77

Fixed probe object delete service.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 06 Aug 2015 09:56:09 +0200
parents 60cc9b5126d1
children 1fa184bc2768
files src/main/java/de/intevation/lada/rest/ProbeService.java
diffstat 1 files changed, 0 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/rest/ProbeService.java	Mon Jul 27 12:58:34 2015 +0200
+++ b/src/main/java/de/intevation/lada/rest/ProbeService.java	Thu Aug 06 09:56:09 2015 +0200
@@ -503,17 +503,6 @@
         ) {
             return new Response(false, 699, null);
         }
-        /* Create a query and request the probetranslation object for the
-         * probe*/
-        QueryBuilder<ProbeTranslation> builder =
-            new QueryBuilder<ProbeTranslation>(
-                defaultRepo.entityManager("land"), ProbeTranslation.class);
-        builder.and("probe", probeObj.getId());
-        Response probeTrans = defaultRepo.filter(builder.getQuery(), "land");
-        @SuppressWarnings("unchecked")
-        ProbeTranslation probeTransObj = ((List<ProbeTranslation>)probeTrans.getData()).get(0);
-        /* Delete the probe translation object*/
-        defaultRepo.delete(probeTransObj, "land");
         /* Delete the probe object*/
         try {
             Response response = defaultRepo.delete(probeObj, "land");
@@ -521,7 +510,6 @@
         }
         catch(IllegalArgumentException | EJBTransactionRolledbackException |
             TransactionRequiredException e) {
-            defaultRepo.update(probeTransObj, "land");
             return new Response(false, 600, "");
         }
     }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)