Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/App.java @ 2877:f0a67bc0e777 2.7
merged flys-backend/2.7
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:31 +0200 |
parents | 8b12b338a3f6 |
children | 76c75c8b9ee0 |
comparison
equal
deleted
inserted
replaced
2793:6310b1582f2d | 2877:f0a67bc0e777 |
---|---|
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 : |