Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/shared/model/BBox.java @ 5200:42bb6ff78d1b 2.9.11
Directly set the connectionInitSqls on the datasource
Somehow the factory fails to set the connectionInitSqls if
we add it to the dbcpProperties. So we now set it directly
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 08 Mar 2013 11:48:33 +0100 |
parents | 910b03de6857 |
children |
line wrap: on
line source
package de.intevation.flys.client.shared.model; import java.io.Serializable; public class BBox implements Serializable { public double lowerX; public double upperX; public double lowerY; public double upperY; public BBox() { } public BBox(double lowerX, double lowerY, double upperX, double upperY) { this.lowerX = lowerX; this.lowerY = lowerY; this.upperX = upperX; this.upperY = upperY; } public double getLowerX() { return lowerX; } public double getLowerY() { return lowerY; } public double getUpperX() { return upperX; } public double getUpperY() { return upperY; } public String toString() { return "(" + lowerX + "," + lowerY + ")" + "(" + upperX + "," + upperY + ")"; } public static BBox getBBoxFromString(String bbox) { String[] coords = bbox != null ? bbox.split(" ") : null; if (coords == null || coords.length < 4) { return null; } try { return new BBox( Double.parseDouble(coords[0]), Double.parseDouble(coords[1]), Double.parseDouble(coords[2]), Double.parseDouble(coords[3])); } catch (NumberFormatException nfe) { // do nothing here } return null; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :