[Lada-commits] [PATCH 01 of 13] Updated hibernate model

Wald Commits scm-commit at wald.intevation.org
Fri May 29 11:48:11 CEST 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1432300216 -7200
# Node ID 196e8c67b8a0125788e9e9cb173172a1409e2d4c
# Parent  6739e857da57a1742a8dcd60e2075b9c3e7756ec
Updated hibernate model.

diff -r 6739e857da57 -r 196e8c67b8a0 src/main/java/de/intevation/lada/model/stamm/DeVg.java
--- 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;
     }
diff -r 6739e857da57 -r 196e8c67b8a0 src/main/java/de/intevation/lada/model/stamm/SOrt.java
--- 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;
     }
 


More information about the Lada-commits mailing list