diff backend/src/main/java/org/dive4elements/river/model/uinfo/SalixValue.java @ 8971:50416a0df385

Importer for the Schifffahrt (S-INFO) and Oekologie (U-INFO) files
author mschaefer
date Tue, 03 Apr 2018 10:18:30 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/backend/src/main/java/org/dive4elements/river/model/uinfo/SalixValue.java	Tue Apr 03 10:18:30 2018 +0200
@@ -0,0 +1,121 @@
+/* Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
+ * Software engineering by
+ *  Björnsen Beratende Ingenieure GmbH
+ *  Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
+package org.dive4elements.river.model.uinfo;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToOne;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+
+/**
+ * Hibernate binding for the DB table salix_values
+ *
+ * @author Matthias Schäfer
+ *
+ */
+@Entity
+@Table(name = "salix_values")
+public class SalixValue implements Serializable {
+
+    /***** FIELDS *****/
+
+    private static final long serialVersionUID = 7775536956084391338L;
+
+    private Integer id;
+
+    private Salix salix;
+
+    private Double station;
+
+    private Double factor;
+
+    private Double mnw_mw_diff;
+
+
+    /***** CONSTRUCTORS *****/
+
+    public SalixValue() {
+    }
+
+    public SalixValue(final Salix salix, final Double station, final Double factor, final Double mnw_mw_diff) {
+        this.salix = salix;
+        this.station = station;
+        this.factor = factor;
+        this.mnw_mw_diff = mnw_mw_diff;
+    }
+
+    /**
+     * Constructor with primitive parameter types
+     */
+    public SalixValue(final Salix salix, final double km, final SalixRank salixType, final double factor, final double mnw_mw_diff) {
+        this(salix, Double.valueOf(km), Double.valueOf(factor), Double.valueOf(mnw_mw_diff));
+    }
+
+
+    /***** METHODS *****/
+
+    @Id
+    @SequenceGenerator(name = "SEQUENCE_SALIX_VALUE_ID_SEQ", sequenceName = "SALIX_VALUES_ID_SEQ", allocationSize = 1)
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_SALIX_VALUE_ID_SEQ")
+    @Column(name = "id")
+    public Integer getId() {
+        return this.id;
+    }
+
+    public void setId(final Integer id) {
+        this.id = id;
+    }
+
+    @OneToOne
+    @JoinColumn(name = "salix_id")
+    public Salix getSalix() {
+        return this.salix;
+    }
+
+    public void setSalix(final Salix salix) {
+        this.salix = salix;
+    }
+
+    @Column(name = "station")
+    public Double getStation() {
+        return this.station;
+    }
+
+    public void setStation(final Double station) {
+        this.station = station;
+    }
+
+    @Column(name = "factor")
+    public Double getFactor() {
+        return this.factor;
+    }
+
+    public void setFactor(final Double factor) {
+        this.factor = factor;
+    }
+
+    @Column(name = "mnw_mw_diff")
+    public Double getMnwMwDiff() {
+        return this.mnw_mw_diff;
+    }
+
+    public void setMnwMwDiff(final Double mnw_mw_diff) {
+        this.mnw_mw_diff = mnw_mw_diff;
+    }
+}

http://dive4elements.wald.intevation.org