[Lada-commits] [PATCH 01 of 10] Fixed stammdaten.ort service

Wald Commits scm-commit at wald.intevation.org
Thu Nov 12 12:20:09 CET 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1446717160 -3600
# Node ID ea6b3f008cd172a361f235ccde2fd706ecd0dc0b
# Parent  c415d14acadd5bc46811717cdacf6f3d11c2e986
Fixed stammdaten.ort service.

diff -r c415d14acadd -r ea6b3f008cd1 src/main/java/de/intevation/lada/model/stamm/SOrt.java
--- 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;
     }
 
diff -r c415d14acadd -r ea6b3f008cd1 src/main/java/de/intevation/lada/rest/stamm/LocationService.java
--- 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");
     }
 


More information about the Lada-commits mailing list