diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/SQRelationAccess.java @ 3210:ae14f412ba10

SQ: finished the access stuff. flys-artifacts/trunk@4831 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 28 Jun 2012 15:46:16 +0000
parents 03fc05655258
children e7a67407dea1
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/SQRelationAccess.java	Thu Jun 28 15:06:58 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/SQRelationAccess.java	Thu Jun 28 15:46:16 2012 +0000
@@ -2,6 +2,8 @@
 
 import de.intevation.flys.artifacts.FLYSArtifact;
 
+import de.intevation.flys.artifacts.model.DateRange;
+
 import org.apache.log4j.Logger;
 
 public class SQRelationAccess
@@ -9,7 +11,13 @@
 {
     private static Logger log = Logger.getLogger(SQRelationAccess.class);
 
-    protected String river;
+    protected String       river;
+
+    protected Double       location;
+
+    protected DateRange [] periods;
+
+    protected Double       outliers;
 
     public SQRelationAccess() {
     }
@@ -27,5 +35,35 @@
         }
         return river;
     }
+
+    public Double getLocation() {
+        if (location == null) {
+            // XXX: The parameter name suggests plural!?
+            location = getDouble("ld_locations");
+        }
+
+        if (log.isDebugEnabled()) {
+            log.debug("location: " + location);
+        }
+
+        return location;
+    }
+
+    public DateRange [] getPeriods() {
+        if (periods == null) {
+            periods = getDateRange("periods");
+        }
+        return periods;
+    }
+
+    public Double getOutliers() {
+        if (outliers == null) {
+            outliers = getDouble("outliers");
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("outliers: " + outliers);
+        }
+        return outliers;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org