changeset 5246:d9deec811152

Removed accidentally ommitted file.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 12 Mar 2013 12:15:47 +0100
parents 8959e1f8d297
children 93d4145d5740
files flys-backend/src/main/java/de/intevation/flys/importer/ImportWaterlevelDifferenceValue.java
diffstat 1 files changed, 0 insertions(+), 76 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportWaterlevelDifferenceValue.java	Tue Mar 12 12:15:23 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-package de.intevation.flys.importer;
-
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-import org.hibernate.Session;
-import org.hibernate.Query;
-
-import de.intevation.flys.model.WaterlevelDifferenceColumn;
-import de.intevation.flys.model.WaterlevelDifferenceValue;
-
-
-public class ImportWaterlevelDifferenceValue {
-
-    private static final Logger log =
-        Logger.getLogger(ImportWaterlevelDifferenceValue.class);
-
-
-    private Double station;
-    private Double value;
-
-    private WaterlevelDifferenceValue peer;
-
-
-    public ImportWaterlevelDifferenceValue(Double station, Double value) {
-        this.station = station;
-        this.value   = value;
-    }
-
-
-    public void storeDependencies(WaterlevelDifferenceColumn column) {
-        getPeer(column);
-    }
-
-
-    /** Get the (usually W/cm) value. */
-    public Double getValue() {
-        return value;
-    }
-
-
-    /** Get the (km) station. */
-    public Double getStation() {
-        return station;
-    }
-
-
-    public WaterlevelDifferenceValue getPeer(WaterlevelDifferenceColumn column) {
-        if (peer == null) {
-            Session session = ImporterSession.getInstance().getDatabaseSession();
-            Query query = session.createQuery(
-                "from WaterlevelDifferenceValue where " +
-                "   column=:column and " +
-                "   station=:station and " +
-                "   value=:value"
-            );
-
-            query.setParameter("column", column);
-            query.setParameter("station", station);
-            query.setParameter("value", value);
-
-            List<WaterlevelDifferenceValue> values = query.list();
-            if (values.isEmpty()) {
-                peer = new WaterlevelDifferenceValue(column, station, value);
-                session.save(peer);
-            }
-            else {
-                peer = values.get(0);
-            }
-        }
-
-        return peer;
-    }
-}
-// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org