Mercurial > dive4elements > river
view flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/SQRelationAccess.java @ 3461:1481322efc02
FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
flys-artifacts/trunk@5129 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 25 Jul 2012 15:07:14 +0000 |
parents | e7a67407dea1 |
children | 048a02e29808 |
line wrap: on
line source
package de.intevation.flys.artifacts.access; import java.util.Date; import org.apache.log4j.Logger; import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.model.DateRange; public class SQRelationAccess extends Access { private static Logger log = Logger.getLogger(SQRelationAccess.class); protected String river; protected Double location; protected DateRange period; protected Double outliers; public SQRelationAccess() { } public SQRelationAccess(FLYSArtifact artifact) { super(artifact); } public String getRiver() { if (river == null) { river = getString("river"); } if (log.isDebugEnabled()) { log.debug("river: '" + river + "'"); } 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 getPeriod() { if (period == null) { Long start = getLong("start"); Long end = getLong("end"); if (start != null && end != null) { period = new DateRange(new Date(start), new Date(end)); } } return period; } 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 :