changeset 670:196e8c67b8a0

Updated hibernate model.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 22 May 2015 15:10:16 +0200
parents 6739e857da57
children 12f859395c4a
files src/main/java/de/intevation/lada/model/stamm/DeVg.java src/main/java/de/intevation/lada/model/stamm/SOrt.java
diffstat 2 files changed, 14 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/model/stamm/DeVg.java	Wed May 20 11:45:01 2015 +0200
+++ b/src/main/java/de/intevation/lada/model/stamm/DeVg.java	Fri May 22 15:10:16 2015 +0200
@@ -18,6 +18,11 @@
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 
+import org.hibernate.annotations.Type;
+
+import com.vividsolutions.jts.geom.Geometry;
+import com.vividsolutions.jts.geom.MultiPolygon;
+
 
 /**
  * The persistent class for the de_vg database table.
@@ -41,7 +46,9 @@
 
     private String gen;
 
-    //private Object geom;
+    @Column(name="geom", columnDefinition="geometry")
+    @Type(type = "org.hibernate.spatial.GeometryType")
+    private MultiPolygon geom;
 
     private double gf;
 
@@ -117,15 +124,15 @@
     public void setGen(String gen) {
         this.gen = gen;
     }
-/*
-    public Object getGeom() {
+
+    public MultiPolygon getGeom() {
         return this.geom;
     }
 
-    public void setGeom(Object geom) {
+    public void setGeom(MultiPolygon geom) {
         this.geom = geom;
     }
-*/
+
     public double getGf() {
         return this.gf;
     }
--- a/src/main/java/de/intevation/lada/model/stamm/SOrt.java	Wed May 20 11:45:01 2015 +0200
+++ b/src/main/java/de/intevation/lada/model/stamm/SOrt.java	Fri May 22 15:10:16 2015 +0200
@@ -122,7 +122,7 @@
         this.koordYExtern = koordYExtern;
     }
 
-    public double getLatitude() {
+    public Double getLatitude() {
         return this.latitude;
     }
 
@@ -138,7 +138,7 @@
         this.letzteAenderung = letzteAenderung;
     }
 
-    public double getLongitude() {
+    public Double getLongitude() {
         return this.longitude;
     }
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)