[Dive4elements-commits] [PATCH 2 of 2] Removed accidentally ommitted file

Wald Commits scm-commit at wald.intevation.org
Tue Mar 12 12:08:44 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1363086947 -3600
# Node ID d9deec8111524fd7d090cdb1a0f798a6f6826ace
# Parent  8959e1f8d297f45ed9bb8390482bdf3e018b4e5e
Removed accidentally ommitted file.

diff -r 8959e1f8d297 -r d9deec811152 flys-backend/src/main/java/de/intevation/flys/importer/ImportWaterlevelDifferenceValue.java
--- 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 :


More information about the Dive4elements-commits mailing list