org.olat.core.commons.persistence
Class DBModule

java.lang.Object
  extended by org.olat.core.commons.persistence.DBModule
All Implemented Interfaces:
OLATModule

public class DBModule
extends java.lang.Object
implements OLATModule

The DBModule is used to initialize database.

Author:
Andreas Ch. Kapp

Field Summary
static java.lang.String HIBERNATE_CONFIG_PRODUCTIONDB
           
static java.lang.String HIBERNATE_CONFIG_TESTDB
           
 
Constructor Summary
DBModule()
           
 
Method Summary
 void destroy()
          Caled during Servlet.destroy()
static java.util.Properties getDbProperties(java.lang.String name)
           
 void init(com.anthonyeden.lib.config.Configuration moduleConfig)
          Initialize database mappings on startup.
static boolean isActivated()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIBERNATE_CONFIG_PRODUCTIONDB

public static final java.lang.String HIBERNATE_CONFIG_PRODUCTIONDB
See Also:
Constant Field Values

HIBERNATE_CONFIG_TESTDB

public static final java.lang.String HIBERNATE_CONFIG_TESTDB
See Also:
Constant Field Values
Constructor Detail

DBModule

public DBModule()
Method Detail

destroy

public void destroy()
Description copied from interface: OLATModule
Caled during Servlet.destroy()

Specified by:
destroy in interface OLATModule
See Also:
OLATModule.destroy()

init

public void init(com.anthonyeden.lib.config.Configuration moduleConfig)
Initialize database mappings on startup.

Specified by:
init in interface OLATModule
See Also:
OLATModule.init(com.anthonyeden.lib.config.Configuration)

getDbProperties

public static java.util.Properties getDbProperties(java.lang.String name)
Parameters:
name - Name of DB configuration set
Returns:
Properties

isActivated

public static boolean isActivated()
Returns:
true if this module has been initialized