org.blojsom.util.database
Class DatabaseLoader

java.lang.Object
  extended byorg.blojsom.util.database.DatabaseLoader

public class DatabaseLoader
extends java.lang.Object

Database loader

Since:
blojsom 3.0
Version:
$Id: DatabaseLoader.java,v 1.6 2007/01/17 02:35:18 czarneckid Exp $
Author:
David Czarnecki

Constructor Summary
DatabaseLoader()
          Create a new instance of the Database loader
 
Method Summary
 void init()
          Initalize the blojsom database
 void setDbScript(java.lang.String dbScript)
          Set the DB script to initialize and load the database
 void setDetectBlojsomSQL(java.lang.String detectBlojsomSQL)
          SQL to detect blojsom
 void setServletConfig(javax.servlet.ServletConfig servletConfig)
          Set the ServletConfig
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
          Set the SessionFactory
 void setUpgrading(boolean upgrading)
          Signal an upgrade for the database loader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseLoader

public DatabaseLoader()
Create a new instance of the Database loader

Method Detail

setSessionFactory

public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set the SessionFactory

Parameters:
sessionFactory - SessionFactory

setDbScript

public void setDbScript(java.lang.String dbScript)
Set the DB script to initialize and load the database

Parameters:
dbScript - DB script to initialize and load the database

setServletConfig

public void setServletConfig(javax.servlet.ServletConfig servletConfig)
Set the ServletConfig

Parameters:
servletConfig - ServletConfig

setDetectBlojsomSQL

public void setDetectBlojsomSQL(java.lang.String detectBlojsomSQL)
SQL to detect blojsom

Parameters:
detectBlojsomSQL - SQL to detect blojsom

setUpgrading

public void setUpgrading(boolean upgrading)
Signal an upgrade for the database loader

Parameters:
upgrading - true if upgrading the database using the database script, false otherwise

init

public void init()
Initalize the blojsom database