|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.opnworks.timesheet.persistence.HibernateUtil
A utility class that is used to configure and manage Hibernate connections
| Field Summary | |
static java.lang.ThreadLocal |
session
Description of the Field |
| Constructor Summary | |
HibernateUtil()
|
|
| Method Summary | |
static void |
buildSessionFactory()
Build a session factory using the receivers configuration and property |
static void |
closeSession()
Description of the Method |
static net.sf.hibernate.Session |
currentSession()
Return the current session |
static void |
initialize()
Initialize the instance using the hibernate.properties file if properties have not been set previously |
static boolean |
isConnected()
|
static void |
setConnectionProperties(java.util.Properties properties)
|
static void |
setProperties(java.util.Properties properties)
Set the properties of the class |
static void |
setSessionFactory(net.sf.hibernate.SessionFactory factory)
|
static void |
shutdown()
Method to shutdown the embedded database (HSQLDB ONLY!) |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.ThreadLocal session
| Constructor Detail |
public HibernateUtil()
| Method Detail |
public static void setSessionFactory(net.sf.hibernate.SessionFactory factory)
factory -
public static void setConnectionProperties(java.util.Properties properties)
throws TimesheetException
properties -
TimesheetException - Description of Exceptionpublic static void setProperties(java.util.Properties properties)
properties - public static boolean isConnected()
public static void initialize()
throws TimesheetException
TimesheetException
public static void buildSessionFactory()
throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException - Description of Exception
public static net.sf.hibernate.Session currentSession()
throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public static void closeSession()
throws net.sf.hibernate.HibernateException
net.sf.hibernate.HibernateException
public static void shutdown()
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||