Mercurial > dive4elements > river
view flys-backend/src/main/java/de/intevation/flys/App.java @ 168:86a1bd9cc50e
More Hibernate/JPA stuff
flys-backend/trunk@1458 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 11 Mar 2011 14:41:18 +0000 |
parents | a69b8494fcac |
children | 7929f4144d2f |
line wrap: on
line source
package de.intevation.flys; import org.hibernate.cfg.Configuration; import org.hibernate.SessionFactory; import de.intevation.flys.model.River; import org.hibernate.dialect.resolver.DialectFactory; import org.hibernate.dialect.Dialect; public class App { public static void main(String [] args) throws Exception { Configuration cfg = new Configuration(); System.err.println(cfg); cfg.addAnnotatedClass(River.class); String [] setupScript = cfg.generateSchemaCreationScript( DialectFactory.constructDialect( "org.hibernate.dialect.PostgreSQLDialect")); for (String line: setupScript) { System.out.println(line); } //SessionFactory sessionFactory = cfg.buildSessionFactory(); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :