[Lada-commits] [PATCH 8 of 8] Update the 'letzteAenderung' field
Wald Commits
scm-commit at wald.intevation.org
Wed Mar 25 16:26:30 CET 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1427297206 -3600
# Node ID 31c4bd94d74eea170640379906199b0fcf64e23c
# Parent 746e03da9fad9988aba69d7eb17ae48b37e94df4
Update the 'letzteAenderung' field.
diff -r 746e03da9fad -r 31c4bd94d74e src/main/java/de/intevation/lada/rest/MessungService.java
--- a/src/main/java/de/intevation/lada/rest/MessungService.java Wed Mar 25 16:20:01 2015 +0100
+++ b/src/main/java/de/intevation/lada/rest/MessungService.java Wed Mar 25 16:26:46 2015 +0100
@@ -162,6 +162,7 @@
if (lock.isLocked(messung)) {
return new Response(false, 697, null);
}
+ messung.setLetzteAenderung(new Timestamp(new Date().getTime()));
Response response = defaultRepo.update(messung, "land");
Response updated = defaultRepo.getById(
LMessung.class,
diff -r 746e03da9fad -r 31c4bd94d74e src/main/java/de/intevation/lada/rest/MesswertService.java
--- a/src/main/java/de/intevation/lada/rest/MesswertService.java Wed Mar 25 16:20:01 2015 +0100
+++ b/src/main/java/de/intevation/lada/rest/MesswertService.java Wed Mar 25 16:26:46 2015 +0100
@@ -7,6 +7,9 @@
*/
package de.intevation.lada.rest;
+import java.sql.Timestamp;
+import java.util.Date;
+
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
@@ -154,6 +157,7 @@
if (lock.isLocked(messwert)) {
return new Response(false, 697, null);
}
+ messwert.setLetzteAenderung(new Timestamp(new Date().getTime()));
Response response = defaultRepo.update(messwert, "land");
Response updated = defaultRepo.getById(
LMesswert.class,
diff -r 746e03da9fad -r 31c4bd94d74e src/main/java/de/intevation/lada/rest/OrtService.java
--- a/src/main/java/de/intevation/lada/rest/OrtService.java Wed Mar 25 16:20:01 2015 +0100
+++ b/src/main/java/de/intevation/lada/rest/OrtService.java Wed Mar 25 16:26:46 2015 +0100
@@ -7,6 +7,9 @@
*/
package de.intevation.lada.rest;
+import java.sql.Timestamp;
+import java.util.Date;
+
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
@@ -152,6 +155,7 @@
if (lock.isLocked(ort)) {
return new Response(false, 697, null);
}
+ ort.setLetzteAenderung(new Timestamp(new Date().getTime()));
Response response = defaultRepo.update(ort, "land");
Response updated = defaultRepo.getById(
LOrt.class,
diff -r 746e03da9fad -r 31c4bd94d74e src/main/java/de/intevation/lada/rest/ProbeService.java
--- a/src/main/java/de/intevation/lada/rest/ProbeService.java Wed Mar 25 16:20:01 2015 +0100
+++ b/src/main/java/de/intevation/lada/rest/ProbeService.java Wed Mar 25 16:26:46 2015 +0100
@@ -262,6 +262,7 @@
response.setWarnings(violation.getWarnings());
return response;
}
+ probe.setLetzteAenderung(new Timestamp(new Date().getTime()));
Response response = defaultRepo.update(probe, "land");
Response updated = defaultRepo.getById(
LProbe.class,
diff -r 746e03da9fad -r 31c4bd94d74e src/main/java/de/intevation/lada/rest/ZusatzwertService.java
--- a/src/main/java/de/intevation/lada/rest/ZusatzwertService.java Wed Mar 25 16:20:01 2015 +0100
+++ b/src/main/java/de/intevation/lada/rest/ZusatzwertService.java Wed Mar 25 16:26:46 2015 +0100
@@ -7,6 +7,9 @@
*/
package de.intevation.lada.rest;
+import java.sql.Timestamp;
+import java.util.Date;
+
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
@@ -147,6 +150,7 @@
if (lock.isLocked(zusatzwert)) {
return new Response(false, 697, null);
}
+ zusatzwert.setLetzteAenderung(new Timestamp(new Date().getTime()));
Response response = defaultRepo.update(zusatzwert, "land");
Response updated = defaultRepo.getById(
LZusatzWert.class,
More information about the Lada-commits
mailing list