comparison flys-backend/src/main/java/de/intevation/flys/App.java @ 3471:e4250c6e1538 2.8.1

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

http://dive4elements.wald.intevation.org