org.apache.ode.il.dbutil

## Class Database

- java.lang.Object
- - org.apache.ode.il.dbutil.Database

- Direct Known Subclasses:
    ExternalDB, InternalDB

      public abstract class Database
      extends java.lang.Object

  Does the dirty work of setting up / obtaining a DataSource based on the configuration in the `OdeConfigProperties` object.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static org.slf4j.Logger` | `__log`
    `protected static org.slf4j.Logger` | `__logSql`
    `protected static Messages` | `__msgs`
    `protected javax.sql.DataSource` | `_datasource`
    `protected OdeConfigProperties` | `_odeConfig`
    `protected boolean` | `_started`
    `protected javax.transaction.TransactionManager` | `_txm`
    `protected java.io.File` | `_workRoot`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Database(OdeConfigProperties props)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Database` | `create(OdeConfigProperties props)`
    `BpelDAOConnectionFactoryJDBC` | `createDaoCF()`
    `javax.sql.DataSource` | `getDataSource()`
    `protected abstract void` | `initDataSource()`
    `void` | `setTransactionManager(javax.transaction.TransactionManager txm)`
    `void` | `setWorkRoot(java.io.File workRoot)`
    `void` | `shutdown()`
    `void` | `start()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### __log

          protected static final org.slf4j.Logger __log

    - #### __logSql

          protected static final org.slf4j.Logger __logSql

    - #### __msgs

          protected static final Messages __msgs

    - #### _odeConfig

          protected OdeConfigProperties _odeConfig

    - #### _started

          protected boolean _started

    - #### _txm

          protected javax.transaction.TransactionManager _txm

    - #### _datasource

          protected javax.sql.DataSource _datasource

    - #### _workRoot

          protected java.io.File _workRoot

  - ### Constructor Detail

    - #### Database

          public Database(OdeConfigProperties props)

  - ### Method Detail

    - #### create

          public static Database create(OdeConfigProperties props)

    - #### setWorkRoot

          public void setWorkRoot(java.io.File workRoot)

    - #### setTransactionManager

          public void setTransactionManager(javax.transaction.TransactionManager txm)

    - #### start

          public void start()
                     throws DatabaseConfigException

      Throws:
        `DatabaseConfigException`

    - #### shutdown

          public void shutdown()

    - #### getDataSource

          public javax.sql.DataSource getDataSource()

    - #### initDataSource

          protected abstract void initDataSource()
                                          throws DatabaseConfigException

      Throws:
        `DatabaseConfigException`

    - #### createDaoCF

          public BpelDAOConnectionFactoryJDBC createDaoCF()
                                                   throws DatabaseConfigException

      Throws:
        `DatabaseConfigException`