com.uoc.tfc.LN.db
Class HibernateSessionFactory

java.lang.Object
  extended by com.uoc.tfc.LN.db.HibernateSessionFactory

public class HibernateSessionFactory
extends java.lang.Object

Author:
ojaen Configura i proporciona acces a les sessions d'Hibernate.

Method Summary
static void closeSession()
          Tanca la sessió .
static org.hibernate.Session currentSession()
          Retorna ThreadLocal Session instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

currentSession

public static org.hibernate.Session currentSession()
                                            throws org.hibernate.HibernateException
Retorna ThreadLocal Session instance.

Returns:
Session
Throws:
org.hibernate.HibernateException

closeSession

public static void closeSession()
                         throws org.hibernate.HibernateException
Tanca la sessió .

Throws:
org.hibernate.HibernateException