comum.database
Class HibernateUtil

java.lang.Object
  extended by comum.database.HibernateUtil

public class HibernateUtil
extends java.lang.Object

Since:
N/C
Version:
N/C
Author:
N/C

Field Summary
private static org.hibernate.cfg.Configuration configuration
           
private static org.hibernate.SessionFactory sessionFactory
           
private static java.lang.ThreadLocal<org.hibernate.Session> thread
           
 
Constructor Summary
HibernateUtil()
           
 
Method Summary
static void clearSession()
          Limpa a sessao.
static void closeSession()
          Fecha a Sessao.
static org.hibernate.Session currentSession()
          Retorna sessao ativa.
static org.hibernate.cfg.Configuration getConfiguration()
          Retorna a Configuracao.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessionFactory

private static final org.hibernate.SessionFactory sessionFactory

thread

private static final java.lang.ThreadLocal<org.hibernate.Session> thread

configuration

private static org.hibernate.cfg.Configuration configuration
Constructor Detail

HibernateUtil

public HibernateUtil()
Method Detail

currentSession

public static org.hibernate.Session currentSession()
                                            throws org.hibernate.HibernateException
Retorna sessao ativa.

Returns:
Session
Throws:
org.hibernate.HibernateException
Since:
N/C

closeSession

public static void closeSession()
                         throws org.hibernate.HibernateException
Fecha a Sessao.

Throws:
org.hibernate.HibernateException
Since:
N/C

clearSession

public static void clearSession()
                         throws org.hibernate.HibernateException
Limpa a sessao.

Throws:
org.hibernate.HibernateException
Since:
N/C

getConfiguration

public static org.hibernate.cfg.Configuration getConfiguration()
Retorna a Configuracao.

Returns:
Configuration
Since:
N/C


Copyright © 2007, PRODEPA - Processamento de Dados do Pará