Package tablegenerator

Source Code of tablegenerator.MainClass

package tablegenerator;

import org.hibernate.Transaction;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;

public class MainClass {
  public static void main(String[] args) {
    try {
      AnnotationConfiguration cfg = new AnnotationConfiguration();
      cfg.configure("hibernate.cfg.xml");
      SessionFactory sessionFactory = cfg.buildSessionFactory();
      Session session = sessionFactory.openSession();
      Transaction tx = session.beginTransaction();
      tx.commit();
      session.close();
      sessionFactory.close();
    } catch (Exception e) {
      System.out.println("");
    }
  }
}
TOP

Related Classes of tablegenerator.MainClass

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.