DBAccessFactory
Keywords: uk.ac.ic.doc.automed.util.db.DBAccessFactory class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.ic.doc.automed.util.db
Class DBAccessFactory

    java.lang.Object
      uk.ac.ic.doc.automed.util.db.DBAccessFactory

    public abstract class DBAccessFactory

extends java.lang.Object

Field Summary
`static java.lang.String` | `DRIVER_HSQLDB` Hypersonic SQL database driver
`static java.lang.String` | `DRIVER_MSSQL` Misrosoft SQL Server database driver
`static java.lang.String` | `DRIVER_MYSQL` MySQL Server database driver
`static java.lang.String` | `DRIVER_ORACLE` Oracle Server database driver
`static java.lang.String` | `DRIVER_POSTGRES` Postgres database driver

Constructor Summary
`DBAccessFactory()`

Method Summary
`static DBAccess` | `getDBAccessInstance(java.lang.String driver, java.lang.String dbFQPath, java.lang.String user, java.lang.String password, java.util.Properties props)` Create a new `DBAccess` instance for a data source. As such, we can initiate multiple databases (data sources) at the same time.
`static void` | `loadDriver(java.lang.String driver)` JDBC driver string to access the data source

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DRIVER_HSQLDB

    public static final java.lang.String DRIVER_HSQLDB

  Hypersonic SQL database driver

  See Also:
    Constant Field Values

### DRIVER_POSTGRES

    public static final java.lang.String DRIVER_POSTGRES

  Postgres database driver

  See Also:
    Constant Field Values

### DRIVER_MSSQL

    public static final java.lang.String DRIVER_MSSQL

  Misrosoft SQL Server database driver

  See Also:
    Constant Field Values

### DRIVER_MYSQL

    public static final java.lang.String DRIVER_MYSQL

  MySQL Server database driver

  See Also:
    Constant Field Values

### DRIVER_ORACLE

    public static final java.lang.String DRIVER_ORACLE

  Oracle Server database driver

  See Also:
    Constant Field Values

Constructor Detail

### DBAccessFactory

    public DBAccessFactory()

Method Detail

### getDBAccessInstance

    public static DBAccess getDBAccessInstance(java.lang.String driver,
                                               java.lang.String dbFQPath,
                                               java.lang.String user,
                                               java.lang.String password,
                                               java.util.Properties props)
                                        throws DBInstanceException

  Create a new `DBAccess` instance for a data source.
  As such, we can initiate multiple databases (data sources) at the same time.

  Parameters:
    `dbFQPath` - the fully qualified path to data source
    `user` - user to connect to
    `password` - password associated to user
    `props` - a `Properties` object specifying extra properties
    E.g. HSQLDB may requires ifexists=true for checking database existence.
    Set this to `null` if no special properties are needed.
  Throws:
    `DBInstanceException`

### loadDriver

    public static void loadDriver(java.lang.String driver)
                           throws JDBCDriverException

  JDBC driver string to access the data source

  Throws:
    `JDBCDriverException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD