Mercurial > dive4elements > river
diff flys-backend/src/main/java/de/intevation/flys/backend/SedDBCredentials.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 | 92c8f8d1a3ba |
children |
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/backend/SedDBCredentials.java Wed Mar 06 14:14:15 2013 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/backend/SedDBCredentials.java Fri Mar 22 11:25:54 2013 +0100 @@ -73,6 +73,9 @@ public static final String XPATH_URL = "/artifact-database/seddb-database/url/text()"; + public static final String XPATH_CONNECTION_INIT_SQLS = + "/artifact-database/seddb-database/connection-init-sqls/text()"; + public static final String DEFAULT_USER = System.getProperty("flys.seddb.user", "seddb"); @@ -94,6 +97,10 @@ "flys.seddb.url", "jdbc:postgresql://localhost:5432/seddb"); + public static final String DEFAULT_CONNECTION_INIT_SQLS = + System.getProperty( + "flys.seddb.connection.init.sqls"); + public static final Class [] CLASSES = { BezugspegelgewId.class, Bezugspegelgew.class, @@ -159,9 +166,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); } public static synchronized Credentials getInstance() { @@ -176,9 +185,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 SedDBCredentials( - user, password, dialect, driver, url); + user, password, dialect, driver, url, connectionInitSqls); } return instance; } @@ -189,7 +202,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 :