io.github.benas.easybatch.tutorials.beanValidation
Class DatabaseUtil

java.lang.Object
  extended by io.github.benas.easybatch.tutorials.beanValidation.DatabaseUtil

public class DatabaseUtil
extends Object

Utility class for embedded database and hibernate services.


Constructor Summary
DatabaseUtil()
           
 
Method Summary
static void closeSessionFactory()
           
static void dumpProductTable()
           
static org.hibernate.Session getCurrentSession()
           
static org.hibernate.SessionFactory getSessionFactory()
           
static void initializeSessionFactory()
           
static void startEmbeddedDatabase()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseUtil

public DatabaseUtil()
Method Detail

getSessionFactory

public static org.hibernate.SessionFactory getSessionFactory()

initializeSessionFactory

public static void initializeSessionFactory()

getCurrentSession

public static org.hibernate.Session getCurrentSession()

closeSessionFactory

public static void closeSessionFactory()

startEmbeddedDatabase

public static void startEmbeddedDatabase()
                                  throws Exception
Throws:
Exception

dumpProductTable

public static void dumpProductTable()
                             throws Exception
Throws:
Exception


Copyright © 2014. All Rights Reserved.