changeset 89:23ac762c46dc

Remove manual reset of success and error attributes. Use reset function now.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 07 Jun 2013 15:20:11 +0200
parents 750e284adc65
children 7b084beab4a7
files src/main/java/de/intevation/lada/data/LProbeRepository.java
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/data/LProbeRepository.java	Fri Jun 07 15:18:59 2013 +0200
+++ b/src/main/java/de/intevation/lada/data/LProbeRepository.java	Fri Jun 07 15:20:11 2013 +0200
@@ -1,9 +1,6 @@
 package de.intevation.lada.data;
 
 import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
@@ -49,6 +46,7 @@
      * @return
      */
     public List<LProbe> filter(String mstId, String uwbId, Long begin) {
+        this.reset();
         CriteriaBuilder cb = em.getCriteriaBuilder();
         CriteriaQuery<LProbe> criteria = cb.createQuery(LProbe.class);
         Root<LProbe> member = criteria.from(LProbe.class);
@@ -91,9 +89,7 @@
      */
     public boolean create(LProbe probe) {
         // Make sure that no old errors and warnings remain.
-        setGeneralError(200);
-        setErrors(new HashMap<String, Integer>());
-        setWarnings(new HashMap<String, Integer>());
+        this.reset();
 
         // Try to save the new LProbe.
         try {
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)