changeset 5058:91630b503ca8 dami

Remove Catchment HWS and Line from the model
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 20 Feb 2013 15:43:11 +0100
parents 790353fadf30
children 2d68969bd2dc
files flys-backend/src/main/java/de/intevation/flys/backend/FLYSCredentials.java flys-backend/src/main/java/de/intevation/flys/model/Catchment.java flys-backend/src/main/java/de/intevation/flys/model/Hws.java flys-backend/src/main/java/de/intevation/flys/model/Line.java
diffstat 4 files changed, 0 insertions(+), 327 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/backend/FLYSCredentials.java	Wed Feb 20 12:22:02 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/backend/FLYSCredentials.java	Wed Feb 20 15:43:11 2013 +0100
@@ -11,7 +11,6 @@
 import de.intevation.flys.model.BedHeightSingleValue;
 import de.intevation.flys.model.BedHeightType;
 import de.intevation.flys.model.Building;
-import de.intevation.flys.model.Catchment;
 import de.intevation.flys.model.CrossSection;
 import de.intevation.flys.model.CrossSectionLine;
 import de.intevation.flys.model.CrossSectionPoint;
@@ -38,10 +37,8 @@
 import de.intevation.flys.model.HYKFlowZone;
 import de.intevation.flys.model.HYKFlowZoneType;
 import de.intevation.flys.model.HYKFormation;
-import de.intevation.flys.model.Hws;
 import de.intevation.flys.model.HydrBoundary;
 import de.intevation.flys.model.HydrBoundaryPoly;
-import de.intevation.flys.model.Line;
 import de.intevation.flys.model.LocationSystem;
 import de.intevation.flys.model.MainValue;
 import de.intevation.flys.model.MainValueType;
@@ -123,7 +120,6 @@
         BedHeightSingleValue.class,
         BedHeightType.class,
         Building.class,
-        Catchment.class,
         CrossSection.class,
         CrossSectionLine.class,
         CrossSectionPoint.class,
@@ -145,7 +141,6 @@
         Gauge.class,
         GaugeLocation.class,
         GrainFraction.class,
-        Hws.class,
         HydrBoundary.class,
         HydrBoundaryPoly.class,
         HYK.class,
@@ -153,7 +148,6 @@
         HYKFormation.class,
         HYKFlowZoneType.class,
         HYKFlowZone.class,
-        Line.class,
         LocationSystem.class,
         MainValueType.class,
         MeasurementStation.class,
--- a/flys-backend/src/main/java/de/intevation/flys/model/Catchment.java	Wed Feb 20 12:22:02 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-package de.intevation.flys.model;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.List;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
-
-import org.hibernate.Session;
-import org.hibernate.Query;
-import org.hibernate.annotations.Type;
-
-import com.vividsolutions.jts.geom.Geometry;
-
-import de.intevation.flys.backend.SessionHolder;
-
-
-@Entity
-@Table(name = "catchment")
-public class Catchment
-implements   Serializable
-{
-    private Integer    id;
-    private BigDecimal area;
-    private String     name;
-    private River      river;
-    private Geometry    geom;
-
-    public Catchment() {
-    }
-
-
-    @Id
-    @Column(name = "id")
-    public Integer getId() {
-        return id;
-    }
-
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-
-    @OneToOne
-    @JoinColumn(name = "river_id")
-    public River getRiver() {
-        return river;
-    }
-
-
-    public void setRiver(River river) {
-        this.river = river;
-    }
-
-
-    @Column(name = "name")
-    public String getName() {
-        return name;
-    }
-
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-
-    @Column(name = "area")
-    public BigDecimal getArea() {
-        return area;
-    }
-
-
-    public void setArea(BigDecimal area) {
-        this.area = area;
-    }
-
-
-    @Column(name = "geom")
-    @Type(type = "org.hibernatespatial.GeometryUserType")
-    public Geometry getGeom() {
-        return geom;
-    }
-
-
-    public void setGeom(Geometry geom) {
-        this.geom = geom;
-    }
-
-
-    public static List<Catchment> getCatchments(int riverId, String name) {
-        Session session = SessionHolder.HOLDER.get();
-
-        Query query = session.createQuery(
-            "from Catchment where river.id =:river_id AND name=:name");
-        query.setParameter("river_id", riverId);
-        query.setParameter("name", name);
-
-        return query.list();
-    }
-}
-// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-backend/src/main/java/de/intevation/flys/model/Hws.java	Wed Feb 20 12:22:02 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-package de.intevation.flys.model;
-
-import java.io.Serializable;
-import java.util.List;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
-
-import org.hibernate.Session;
-import org.hibernate.Query;
-import org.hibernate.annotations.Type;
-
-import com.vividsolutions.jts.geom.LineString;
-
-import de.intevation.flys.backend.SessionHolder;
-
-
-@Entity
-@Table(name = "hws")
-public class Hws
-implements   Serializable
-{
-    private Integer    id;
-    private String     facility;
-    private String     type;
-    private River      river;
-    private LineString geom;
-
-    public Hws() {
-    }
-
-
-    @Id
-    @Column(name = "id")
-    public Integer getId() {
-        return id;
-    }
-
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-
-    @OneToOne
-    @JoinColumn(name = "river_id")
-    public River getRiver() {
-        return river;
-    }
-
-
-    public void setRiver(River river) {
-        this.river = river;
-    }
-
-
-    @Column(name = "hws_facility")
-    public String getFacility() {
-        return facility;
-    }
-
-
-    public void setFacility(String facility) {
-        this.facility = facility;
-    }
-
-
-    @Column(name = "type")
-    public String getType() {
-        return type;
-    }
-
-
-    public void setType(String type) {
-        this.type = type;
-    }
-
-
-    @Column(name = "geom")
-    @Type(type = "org.hibernatespatial.GeometryUserType")
-    public LineString getGeom() {
-        return geom;
-    }
-
-
-    public void setGeom(LineString geom) {
-        this.geom = geom;
-    }
-
-
-    public static List<Hws> getHws(int riverId, String name) {
-        Session session = SessionHolder.HOLDER.get();
-
-        Query query = session.createQuery(
-            "from Hws where river.id =:river_id and name=:name");
-        query.setParameter("river_id", riverId);
-        query.setParameter("name", name);
-
-        return query.list();
-    }
-}
-// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-backend/src/main/java/de/intevation/flys/model/Line.java	Wed Feb 20 12:22:02 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-package de.intevation.flys.model;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.List;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
-
-import org.hibernate.Session;
-import org.hibernate.Query;
-
-import org.hibernate.annotations.Type;
-
-import com.vividsolutions.jts.geom.LineString;
-
-import de.intevation.flys.backend.SessionHolder;
-
-
-@Entity
-@Table(name = "lines")
-public class Line
-implements   Serializable
-{
-    private Integer    id;
-    private String     kind;
-    private River      river;
-    private LineString geom;
-    private BigDecimal z;
-
-    public Line() {
-    }
-
-
-    @Id
-    @Column(name = "id")
-    public Integer getId() {
-        return id;
-    }
-
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-
-    @OneToOne
-    @JoinColumn(name = "river_id")
-    public River getRiver() {
-        return river;
-    }
-
-
-    public void setRiver(River river) {
-        this.river = river;
-    }
-
-
-    @Column(name = "kind")
-    public String getKind() {
-        return kind;
-    }
-
-
-    public void setKind(String kind) {
-        this.kind = kind;
-    }
-
-
-    @Column(name = "geom")
-    @Type(type = "org.hibernatespatial.GeometryUserType")
-    public LineString getGeom() {
-        return geom;
-    }
-
-
-    public void setGeom(LineString geom) {
-        this.geom = geom;
-    }
-
-
-    @Column(name = "z")
-    public BigDecimal getZ() {
-        return z;
-    }
-
-
-    public void setZ(BigDecimal z) {
-        this.z = z;
-    }
-
-
-    public static List<Line> getLines(int riverId, String name) {
-        Session session = SessionHolder.HOLDER.get();
-
-        Query query = session.createQuery(
-            "from Line where river.id =:river_id and name=:name");
-        query.setParameter("river_id", riverId);
-        query.setParameter("name", name);
-
-        return query.list();
-    }
-}
-// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org