comparison flys-backend/src/main/java/de/intevation/flys/backend/SessionFactoryProvider.java @ 2362:2649151c9500

Added some functions that return information about the db connection used by the current database session. flys-backend/trunk@3198 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 09 Nov 2011 14:59:01 +0000
parents e9b0fd1de89d
children a8f408fdf58c
comparison
equal deleted inserted replaced
2361:e9b0fd1de89d 2362:2649151c9500
268 268
269 return cfg; 269 return cfg;
270 } 270 }
271 271
272 272
273 public static String getProperty(SessionFactoryImpl factory, String key) {
274 Properties props = factory.getProperties();
275 return props.getProperty(key);
276 }
277
278 public static String getUser(SessionFactoryImpl factory) {
279 return getProperty(factory, Environment.USER);
280 }
281
282
283 public static String getPass(SessionFactoryImpl factory) {
284 return getProperty(factory, Environment.PASS);
285 }
286
287
288 public static String getURL(SessionFactoryImpl factory) {
289 return getProperty(factory, Environment.URL);
290 }
291
292
273 public static String getDriver(SessionFactoryImpl factory) { 293 public static String getDriver(SessionFactoryImpl factory) {
274 Properties props = factory.getProperties(); 294 return getProperty(factory, Environment.DRIVER);
275
276 return props.getProperty(Environment.DRIVER);
277 } 295 }
278 } 296 }
279 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 297 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org