changeset 767:ea6b3f008cd1

Fixed stammdaten.ort service.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 05 Nov 2015 10:52:40 +0100
parents c415d14acadd
children f2ae2d734b80
files src/main/java/de/intevation/lada/model/stamm/SOrt.java src/main/java/de/intevation/lada/rest/stamm/LocationService.java
diffstat 2 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/stamm/SOrt.java	Wed Nov 04 13:00:04 2015 +0100
+++ b/src/main/java/de/intevation/lada/model/stamm/SOrt.java	Thu Nov 05 10:52:40 2015 +0100
@@ -10,12 +10,16 @@
 import java.io.Serializable;
 import java.sql.Timestamp;
 
+import javax.inject.Inject;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
+import javax.persistence.Transient;
+
+import org.apache.log4j.Logger;
 
 
 /**
@@ -25,6 +29,9 @@
 @Table(name="ort")
 public class SOrt implements Serializable {
     private static final long serialVersionUID = 1L;
+    @Inject
+    @Transient
+    private Logger logger = Logger.getLogger(SOrt.class);
 
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
@@ -131,10 +138,12 @@
     }
 
     public Timestamp getLetzteAenderung() {
+        logger.debug("get date: " + this.letzteAenderung.toString());
         return this.letzteAenderung;
     }
 
     public void setLetzteAenderung(Timestamp letzteAenderung) {
+        logger.debug("set date: " + letzteAenderung.toString());
         this.letzteAenderung = letzteAenderung;
     }
 
--- a/src/main/java/de/intevation/lada/rest/stamm/LocationService.java	Wed Nov 04 13:00:04 2015 +0100
+++ b/src/main/java/de/intevation/lada/rest/stamm/LocationService.java	Thu Nov 05 10:52:40 2015 +0100
@@ -99,12 +99,12 @@
         if (params.isEmpty() || !params.containsKey("ortId")) {
             return defaultRepo.getAll(SOrt.class, "stamm");
         }
-        String probeId = params.getFirst("ortId");
+        String ortId = params.getFirst("ortId");
         QueryBuilder<SOrt> builder =
             new QueryBuilder<SOrt>(
-                defaultRepo.entityManager("land"),
+                defaultRepo.entityManager("stamm"),
                 SOrt.class);
-        builder.and("probeId", probeId);
+        builder.and("ortId", ortId);
         return defaultRepo.filter(builder.getQuery(), "stamm");
     }
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)