comparison flys-backend/src/main/java/de/intevation/flys/App.java @ 3820:8a75cf0841b1 pre2.7-2012-03-16

merged flys-backend/pre2.7-2012-03-16
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:59 +0200
parents 8b12b338a3f6
children 76c75c8b9ee0
comparison
equal deleted inserted replaced
3818:dc18457b1cef 3820:8a75cf0841b1
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