diff flys-backend/src/main/java/de/intevation/flys/backend/FLYSCredentials.java @ 5379:61bf64b102bc mapgenfix

Merge with default branch
author Christian Lins <christian.lins@intevation.de>
date Fri, 22 Mar 2013 11:25:54 +0100
parents 75c13f65b539
children b582df0c7b00
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/backend/FLYSCredentials.java	Wed Mar 06 14:14:15 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/backend/FLYSCredentials.java	Fri Mar 22 11:25:54 2013 +0100
@@ -5,17 +5,19 @@
 import de.intevation.flys.model.Annotation;
 import de.intevation.flys.model.AnnotationType;
 import de.intevation.flys.model.Attribute;
+import de.intevation.flys.model.AxisKind;
 import de.intevation.flys.model.BedHeightEpoch;
 import de.intevation.flys.model.BedHeightEpochValue;
 import de.intevation.flys.model.BedHeightSingle;
 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.BoundaryKind;
 import de.intevation.flys.model.CrossSection;
 import de.intevation.flys.model.CrossSectionLine;
 import de.intevation.flys.model.CrossSectionPoint;
 import de.intevation.flys.model.CrossSectionTrack;
+import de.intevation.flys.model.CrossSectionTrackKind;
 import de.intevation.flys.model.DGM;
 import de.intevation.flys.model.Depth;
 import de.intevation.flys.model.DischargeTable;
@@ -23,9 +25,11 @@
 import de.intevation.flys.model.DischargeZone;
 import de.intevation.flys.model.Edge;
 import de.intevation.flys.model.ElevationModel;
+import de.intevation.flys.model.FedState;
 import de.intevation.flys.model.Fixpoint;
 import de.intevation.flys.model.Floodmaps;
 import de.intevation.flys.model.Floodplain;
+import de.intevation.flys.model.FloodplainKind;
 import de.intevation.flys.model.FlowVelocityMeasurement;
 import de.intevation.flys.model.FlowVelocityMeasurementValue;
 import de.intevation.flys.model.FlowVelocityModel;
@@ -33,15 +37,16 @@
 import de.intevation.flys.model.Gauge;
 import de.intevation.flys.model.GaugeLocation;
 import de.intevation.flys.model.GrainFraction;
+import de.intevation.flys.model.HWSKind;
+import de.intevation.flys.model.HWSLine;
+import de.intevation.flys.model.HWSPoint;
 import de.intevation.flys.model.HYK;
 import de.intevation.flys.model.HYKEntry;
 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;
@@ -56,18 +61,14 @@
 import de.intevation.flys.model.RiverAxisKm;
 import de.intevation.flys.model.SQRelation;
 import de.intevation.flys.model.SQRelationValue;
+import de.intevation.flys.model.SectieKind;
+import de.intevation.flys.model.SobekKind;
 import de.intevation.flys.model.SedimentDensity;
 import de.intevation.flys.model.SedimentDensityValue;
 import de.intevation.flys.model.SedimentYield;
 import de.intevation.flys.model.SedimentYieldValue;
 import de.intevation.flys.model.TimeInterval;
 import de.intevation.flys.model.Unit;
-import de.intevation.flys.model.Waterlevel;
-import de.intevation.flys.model.WaterlevelDifference;
-import de.intevation.flys.model.WaterlevelDifferenceColumn;
-import de.intevation.flys.model.WaterlevelDifferenceValue;
-import de.intevation.flys.model.WaterlevelQRange;
-import de.intevation.flys.model.WaterlevelValue;
 import de.intevation.flys.model.Wst;
 import de.intevation.flys.model.WstColumn;
 import de.intevation.flys.model.WstColumnQRange;
@@ -92,6 +93,9 @@
     public static final String XPATH_URL =
         "/artifact-database/backend-database/url/text()";
 
+    public static final String XPATH_CONNECTION_INIT_SQLS =
+        "/artifact-database/backend-database/connection-init-sqls/text()";
+
     public static final String DEFAULT_USER =
         System.getProperty("flys.backend.user", "flys");
 
@@ -113,21 +117,27 @@
             "flys.backend.url",
             "jdbc:postgresql://localhost:5432/flys");
 
+    public static final String DEFAULT_CONNECTION_INIT_SQLS =
+        System.getProperty(
+            "flys.backend.connection.init.sqls");
+
     public static final Class [] CLASSES = {
         Annotation.class,
         AnnotationType.class,
         Attribute.class,
+        AxisKind.class,
         BedHeightEpoch.class,
         BedHeightEpochValue.class,
         BedHeightSingle.class,
         BedHeightSingleValue.class,
         BedHeightType.class,
         Building.class,
-        Catchment.class,
+        BoundaryKind.class,
         CrossSection.class,
         CrossSectionLine.class,
         CrossSectionPoint.class,
         CrossSectionTrack.class,
+        CrossSectionTrackKind.class,
         Depth.class,
         DGM.class,
         DischargeTable.class,
@@ -135,8 +145,10 @@
         DischargeZone.class,
         Edge.class,
         ElevationModel.class,
+        FedState.class,
         Fixpoint.class,
         Floodplain.class,
+        FloodplainKind.class,
         Floodmaps.class,
         FlowVelocityMeasurement.class,
         FlowVelocityMeasurementValue.class,
@@ -145,7 +157,9 @@
         Gauge.class,
         GaugeLocation.class,
         GrainFraction.class,
-        Hws.class,
+        HWSKind.class,
+        HWSLine.class,
+        HWSPoint.class,
         HydrBoundary.class,
         HydrBoundaryPoly.class,
         HYK.class,
@@ -153,7 +167,6 @@
         HYKFormation.class,
         HYKFlowZoneType.class,
         HYKFlowZone.class,
-        Line.class,
         LocationSystem.class,
         MainValueType.class,
         MeasurementStation.class,
@@ -166,6 +179,8 @@
         River.class,
         RiverAxis.class,
         RiverAxisKm.class,
+        SectieKind.class,
+        SobekKind.class,
         SedimentDensity.class,
         SedimentDensityValue.class,
         SedimentYield.class,
@@ -174,12 +189,6 @@
         SQRelationValue.class,
         TimeInterval.class,
         Unit.class,
-        Waterlevel.class,
-        WaterlevelDifference.class,
-        WaterlevelDifferenceColumn.class,
-        WaterlevelDifferenceValue.class,
-        WaterlevelQRange.class,
-        WaterlevelValue.class,
         WstColumn.class,
         WstColumnQRange.class,
         WstColumnValue.class,
@@ -195,9 +204,11 @@
         String password,
         String dialect,
         String driver,
-        String url
+        String url,
+        String connectionInitSqls
     ) {
-        super(user, password, dialect, driver, url, CLASSES);
+        super(
+            user, password, dialect, driver, url, connectionInitSqls, CLASSES);
     }
 
     private static Credentials instance;
@@ -214,9 +225,13 @@
                 Config.getStringXPath(XPATH_DRIVER, DEFAULT_DRIVER);
             String url =
                 Config.getStringXPath(XPATH_URL, DEFAULT_URL);
+            String connectionInitSqls =
+                Config.getStringXPath(
+                    XPATH_CONNECTION_INIT_SQLS,
+                    DEFAULT_CONNECTION_INIT_SQLS);
 
             instance = new FLYSCredentials(
-                user, password, dialect, driver, url);
+                user, password, dialect, driver, url, connectionInitSqls);
         }
         return instance;
     }
@@ -227,7 +242,8 @@
             DEFAULT_PASSWORD,
             DEFAULT_DIALECT,
             DEFAULT_DRIVER,
-            DEFAULT_URL);
+            DEFAULT_URL,
+            DEFAULT_CONNECTION_INIT_SQLS);
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org