comparison flys-backend/src/main/java/de/intevation/flys/App.java @ 3807:d73c43798a99 pre2.6-2011-11-04

merged flys-backend/pre2.6-2011-11-04
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:51 +0200
parents 8b12b338a3f6
children 76c75c8b9ee0
comparison
equal deleted inserted replaced
3806:881fcd01e056 3807:d73c43798a99
1 package de.intevation.flys;
2
3 import de.intevation.flys.backend.SessionFactoryProvider;
4
5 import org.hibernate.cfg.Configuration;
6
7 import org.hibernate.dialect.resolver.DialectFactory;
8
9 public class App
10 {
11 public static void dumpSchema(Configuration cfg) {
12 System.out.println("BEGIN;");
13
14 String [] setupScript = cfg.generateSchemaCreationScript(
15 DialectFactory.constructDialect(
16 SessionFactoryProvider.DEFAULT_DIALECT));
17
18 for (String line: setupScript) {
19 System.out.println(line + ";");
20 }
21
22 System.out.println("COMMIT;");
23 }
24
25 public static void main(String [] args) {
26 dumpSchema(SessionFactoryProvider.createConfiguration());
27 }
28 }
29 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org