diff src/main/java/de/intevation/lada/data/LOrtRepository.java @ 260:0de24f5e7c01

Added boolean parameter to validate method to test if update or create was triggered.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 16 Jul 2013 08:24:34 +0200
parents f0482fa04e2b
children 567ce7697fc7
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/data/LOrtRepository.java	Tue Jul 16 08:05:06 2013 +0200
+++ b/src/main/java/de/intevation/lada/data/LOrtRepository.java	Tue Jul 16 08:24:34 2013 +0200
@@ -109,7 +109,7 @@
         Response response = new Response(true, 200, ort);
         // Try to save the new LOrt.
         try {
-            Map<String, Integer> warnings = validator.validate(ort);
+            Map<String, Integer> warnings = validator.validate(ort, false);
             manager.create(ort);
             response.setWarnings(warnings);
             return response;
@@ -153,7 +153,7 @@
         Response response = new Response(true, 200, ort);
         // Try to update a LOrt object.
         try {
-            Map<String, Integer> warnings = validator.validate(ort);
+            Map<String, Integer> warnings = validator.validate(ort, true);
             manager.update(ort);
             response.setWarnings(warnings);
             return response;
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)