Mercurial > dive4elements > river
changeset 2361:e9b0fd1de89d
Made flys-backend compatible with oracle spatial.
flys-backend/trunk@3188 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 09 Nov 2011 10:31:08 +0000 (2011-11-09) |
parents | 9df06b88c079 |
children | 2649151c9500 |
files | flys-backend/ChangeLog flys-backend/src/main/java/de/intevation/flys/backend/SessionFactoryProvider.java flys-backend/src/main/java/de/intevation/flys/model/Floodplain.java |
diffstat | 3 files changed, 22 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-backend/ChangeLog Tue Nov 01 15:30:38 2011 +0000 +++ b/flys-backend/ChangeLog Wed Nov 09 10:31:08 2011 +0000 @@ -1,3 +1,12 @@ +2011-11-09 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/model/Floodplain.java: Changed the + geometry type from MultiPolygon to Polygon. + + * src/main/java/de/intevation/flys/backend/SessionFactoryProvider.java: + Added a function that returns the db driver of a given + SessionFactoryImpl instance. + 2011-11-01 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/model/RiverAxisKm.java: New. Model class
--- a/flys-backend/src/main/java/de/intevation/flys/backend/SessionFactoryProvider.java Tue Nov 01 15:30:38 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/backend/SessionFactoryProvider.java Wed Nov 09 10:31:08 2011 +0000 @@ -14,6 +14,8 @@ import org.hibernate.SessionFactory; +import org.hibernate.impl.SessionFactoryImpl; + import org.hibernate.jmx.StatisticsService; import org.hibernate.cfg.Configuration; @@ -266,5 +268,12 @@ return cfg; } + + + public static String getDriver(SessionFactoryImpl factory) { + Properties props = factory.getProperties(); + + return props.getProperty(Environment.DRIVER); + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-backend/src/main/java/de/intevation/flys/model/Floodplain.java Tue Nov 01 15:30:38 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/Floodplain.java Wed Nov 09 10:31:08 2011 +0000 @@ -14,7 +14,7 @@ import org.hibernate.Session; import org.hibernate.annotations.Type; -import com.vividsolutions.jts.geom.MultiPolygon; +import com.vividsolutions.jts.geom.Polygon; import de.intevation.flys.backend.SessionHolder; @@ -28,7 +28,7 @@ private River river; - private MultiPolygon geom; + private Polygon geom; public Floodplain() { @@ -57,11 +57,11 @@ @Column(name = "geom") @Type(type = "org.hibernatespatial.GeometryUserType") - public MultiPolygon getGeom() { + public Polygon getGeom() { return geom; } - public void setGeom(MultiPolygon geom) { + public void setGeom(Polygon geom) { this.geom = geom; }