comparison 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
comparison
equal deleted inserted replaced
3209:03fc05655258 3210:ae14f412ba10
1 package de.intevation.flys.artifacts.access; 1 package de.intevation.flys.artifacts.access;
2 2
3 import de.intevation.flys.artifacts.FLYSArtifact; 3 import de.intevation.flys.artifacts.FLYSArtifact;
4
5 import de.intevation.flys.artifacts.model.DateRange;
4 6
5 import org.apache.log4j.Logger; 7 import org.apache.log4j.Logger;
6 8
7 public class SQRelationAccess 9 public class SQRelationAccess
8 extends Access 10 extends Access
9 { 11 {
10 private static Logger log = Logger.getLogger(SQRelationAccess.class); 12 private static Logger log = Logger.getLogger(SQRelationAccess.class);
11 13
12 protected String river; 14 protected String river;
15
16 protected Double location;
17
18 protected DateRange [] periods;
19
20 protected Double outliers;
13 21
14 public SQRelationAccess() { 22 public SQRelationAccess() {
15 } 23 }
16 24
17 public SQRelationAccess(FLYSArtifact artifact) { 25 public SQRelationAccess(FLYSArtifact artifact) {
25 if (log.isDebugEnabled()) { 33 if (log.isDebugEnabled()) {
26 log.debug("river: '" + river + "'"); 34 log.debug("river: '" + river + "'");
27 } 35 }
28 return river; 36 return river;
29 } 37 }
38
39 public Double getLocation() {
40 if (location == null) {
41 // XXX: The parameter name suggests plural!?
42 location = getDouble("ld_locations");
43 }
44
45 if (log.isDebugEnabled()) {
46 log.debug("location: " + location);
47 }
48
49 return location;
50 }
51
52 public DateRange [] getPeriods() {
53 if (periods == null) {
54 periods = getDateRange("periods");
55 }
56 return periods;
57 }
58
59 public Double getOutliers() {
60 if (outliers == null) {
61 outliers = getDouble("outliers");
62 }
63 if (log.isDebugEnabled()) {
64 log.debug("outliers: " + outliers);
65 }
66 return outliers;
67 }
30 } 68 }
31 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 69 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org