Mercurial > lada > lada-server
changeset 596:31c4bd94d74e
Update the 'letzteAenderung' field.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 25 Mar 2015 16:26:46 +0100 |
parents | 746e03da9fad |
children | 8d238aa430e3 |
files | src/main/java/de/intevation/lada/rest/MessungService.java src/main/java/de/intevation/lada/rest/MesswertService.java src/main/java/de/intevation/lada/rest/OrtService.java src/main/java/de/intevation/lada/rest/ProbeService.java src/main/java/de/intevation/lada/rest/ZusatzwertService.java |
diffstat | 5 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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,
--- 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,
--- 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,
--- 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,
--- 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,