Mercurial > lada > lada-server
comparison src/main/java/de/intevation/lada/validation/rules/messung/HasNebenprobenNr.java @ 1028:1c41c7b8f7c2 schema-update
Updated server application to new database model. THIS IS STILL WIP!!!
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 08 Jul 2016 15:32:36 +0200 |
parents | 3ec358698b4d |
children |
comparison
equal
deleted
inserted
replaced
1027:9971471d562c | 1028:1c41c7b8f7c2 |
---|---|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out | 5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
6 * the documentation coming with IMIS-Labordaten-Application for details. | 6 * the documentation coming with IMIS-Labordaten-Application for details. |
7 */ | 7 */ |
8 package de.intevation.lada.validation.rules.messung; | 8 package de.intevation.lada.validation.rules.messung; |
9 | 9 |
10 import de.intevation.lada.model.land.LMessung; | 10 import de.intevation.lada.model.land.Messung; |
11 import de.intevation.lada.validation.Violation; | 11 import de.intevation.lada.validation.Violation; |
12 import de.intevation.lada.validation.annotation.ValidationRule; | 12 import de.intevation.lada.validation.annotation.ValidationRule; |
13 import de.intevation.lada.validation.rules.Rule; | 13 import de.intevation.lada.validation.rules.Rule; |
14 | 14 |
15 /** | 15 /** |
21 @ValidationRule("Messung") | 21 @ValidationRule("Messung") |
22 public class HasNebenprobenNr implements Rule { | 22 public class HasNebenprobenNr implements Rule { |
23 | 23 |
24 @Override | 24 @Override |
25 public Violation execute(Object object) { | 25 public Violation execute(Object object) { |
26 LMessung messung = (LMessung)object; | 26 Messung messung = (Messung)object; |
27 if (messung.getNebenprobenNr() == null || | 27 if (messung.getNebenprobenNr() == null || |
28 messung.getNebenprobenNr().equals("")) { | 28 messung.getNebenprobenNr().equals("")) { |
29 Violation violation = new Violation(); | 29 Violation violation = new Violation(); |
30 violation.addWarning("nebenprobenNr", 631); | 30 violation.addWarning("nebenprobenNr", 631); |
31 return violation; | 31 return violation; |