Mercurial > lada > lada-server
diff src/main/java/de/intevation/lada/validation/LProbeValidator.java @ 263:2098db2e8fbd M1
Code documentation.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 17 Jul 2013 09:40:53 +0200 |
parents | 0de24f5e7c01 |
children | aadc0bb0dc1d |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/validation/LProbeValidator.java Wed Jul 17 09:40:35 2013 +0200 +++ b/src/main/java/de/intevation/lada/validation/LProbeValidator.java Wed Jul 17 09:40:53 2013 +0200 @@ -37,7 +37,11 @@ /** * Validate a LProbe object. * - * @param probe The LProbe object. + * @param probe The LProbe object. + * @param update The database operation. + * TRUE indicates that the object should be updated, FALSE + * if the object is a new Object. + * @return Map containing warnings. */ @Override public Map<String, Integer> validate(Object probe, boolean update) @@ -57,6 +61,13 @@ return warnings; } + /** + * Check if the 'Hauptproben Nr' is unique. + * + * @param p The LProbe object. + * @param warnings The map containing warnings. + * @throws ValidationException + */ private void validateHauptProbenNummer(LProbe p, Map<String, Integer> warnings) throws ValidationException { String hpn = p.getHauptprobenNr(); @@ -73,6 +84,12 @@ } } + /** + * Check if the LProbe object has 'Entnahmeort'. + * + * @param probe + * @param warnings + */ private void validateEntnahmeOrt(LProbe probe, Map<String, Integer> warnings) { String pid = probe.getProbeId(); @@ -87,6 +104,12 @@ } } + /** + * Check if 'Probenahmeende' is after 'Probenahmebeginn'. + * + * @param probe The LProbe object. + * @param warnings The map containing warnings. + */ private void validateProbenahmeBegin(LProbe probe, Map<String, Integer> warnings) { Date begin = probe.getProbeentnahmeBeginn(); if (begin == null) { @@ -97,6 +120,12 @@ } } + /** + * Check if the LProbe object has a 'Umweltbereich'. + * + * @param probe The LProbe object. + * @param warnings The map containing warnings. + */ private void validateUWB(LProbe probe, Map<String, Integer> warnings) { String uwb = probe.getUmwId(); if (uwb == null || uwb.equals("")) {