com.irisel.oms.dbh
Class DbhFactory

java.lang.Object
  extended by com.irisel.modules.DefaultModuleInfo
      extended by com.irisel.modules.AbstractModule
          extended by com.irisel.oms.dbh.DbhFactory
All Implemented Interfaces:
Module, ModuleInfo

public class DbhFactory
extends AbstractModule


Field Summary
static java.lang.String PREFIX_KEY_DBH
           
 
Constructor Summary
DbhFactory()
           
 
Method Summary
static DBHandler getDbh(java.lang.String dbhType, java.lang.String dsn, java.lang.String user, java.lang.String password)
           
static DBHandler getDbh(java.lang.String dbhType, java.lang.String host, java.lang.String port, java.lang.String db, java.lang.String schema, java.lang.String user, java.lang.String password)
           
static java.lang.String[] getDbhTypes()
           
static DbhFactory getInstance()
           
 void initialize()
          Initializes the module.
 
Methods inherited from class com.irisel.modules.AbstractModule
configure, getDescription, getName, getOptionalModules, getProducer, getRequiredModules, getSubSystem, setOptionalModules, toString
 
Methods inherited from class com.irisel.modules.DefaultModuleInfo
equals, getMajorVersion, getMinorVersion, getModuleClass, getPatchLevel, hashCode, setMajorVersion, setMinorVersion, setModuleClass, setPatchLevel
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.irisel.modules.ModuleInfo
getMajorVersion, getMinorVersion, getModuleClass, getPatchLevel
 

Field Detail

PREFIX_KEY_DBH

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

DbhFactory

public DbhFactory()
Method Detail

getDbh

public static DBHandler getDbh(java.lang.String dbhType,
                               java.lang.String dsn,
                               java.lang.String user,
                               java.lang.String password)
                        throws ConnectionException
Throws:
ConnectionException

getDbh

public static DBHandler getDbh(java.lang.String dbhType,
                               java.lang.String host,
                               java.lang.String port,
                               java.lang.String db,
                               java.lang.String schema,
                               java.lang.String user,
                               java.lang.String password)
                        throws ConnectionException
Throws:
ConnectionException

getDbhTypes

public static java.lang.String[] getDbhTypes()
                                      throws ConfigException
Throws:
ConfigException

initialize

public void initialize()
                throws ModuleInitializeException
Initializes the module. Use this method to perform all initial setup operations. This method is called only once in a modules lifetime. If the initializing cannot be completed, throw a ModuleInitializeException to indicate the error,. The module will not be available to the system.

Throws:
ModuleInitializeException - if an error ocurred while initializing the module.

getInstance

public static DbhFactory getInstance()