com.irisel.oms.dbh
Class DbhFactory
java.lang.Object
com.irisel.modules.DefaultModuleInfo
com.irisel.modules.AbstractModule
com.irisel.oms.dbh.DbhFactory
- All Implemented Interfaces:
- Module, ModuleInfo
public class DbhFactory
- extends AbstractModule
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 java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
PREFIX_KEY_DBH
public static final java.lang.String PREFIX_KEY_DBH
- See Also:
- Constant Field Values
DbhFactory
public DbhFactory()
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()