org.olat.core.commons.persistence
Class DBFactory

java.lang.Object
  extended by org.olat.core.commons.persistence.DBFactory

public class DBFactory
extends java.lang.Object


Constructor Summary
DBFactory()
           
 
Method Summary
static DB getInstance()
          !!IMPORTANT!! Get the DB instance.
static DB getInstance(boolean initialize)
           
static DB getInstanceForClosing()
           
static DBJunit getJunitInstance()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBFactory

public DBFactory()
Method Detail

getInstance

public static DB getInstance()
!!IMPORTANT!! Get the DB instance. The DB Session is lazy initialized. Make sure you don't save the instance in a class variable as you do not have a guarantee that a Hibernate session is already initialized.

Returns:
the DB instance.

getInstance

public static DB getInstance(boolean initialize)

getJunitInstance

public static DBJunit getJunitInstance()

getInstanceForClosing

public static DB getInstanceForClosing()