PersistentDBController
Keywords: uk.ac.ic.doc.automed.util.persist.PersistentDBController 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.persist
Class PersistentDBController

    java.lang.Object
      uk.ac.ic.doc.automed.util.persist.PersistentDBController

    public class PersistentDBController

extends java.lang.Object

Field Summary
`static java.lang.String` | `DB_ENV_CACHE_PATH`
`static java.lang.String` | `DB_ENV_FILE_PATH`
`static java.lang.String` | `DB_ENV_OVERLAY_PATH`
`static java.lang.String` | `DBN_QUERY_CACHE`

Method Summary
`void` | `close()` Close the environment
`PersistentDB` | `createDB(java.lang.String dbName, boolean duplicateAllowed, com.sleepycat.bind.EntryBinding valBinder)` Create a new persistent database
`com.sleepycat.bind.serial.StoredClassCatalog` | `getClassCatalog()` The class datalog
`java.lang.String[]` | `getDatabaseNames()` Get a list of db names
`com.sleepycat.je.Database` | `getDB(java.lang.String dbName)` Return reference to a created database object
`com.sleepycat.je.Environment` | `getEnv()` Return the database environment Needed for things like beginning transactions
`static PersistentDBController` | `getInstance(java.lang.String dbEnvFile, boolean readOnly)` Set up the environment once
`com.sleepycat.je.SecondaryDatabase` | `getNameIndexDB()` Return reference to the secondary database (used for indexing)
`com.sleepycat.bind.EntryBinding` | `getSerialEntryBinding(java.lang.Class userCls)` Return serial-type entry binding
`void` | `removeDB(java.lang.String dbName)` Delete database

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

Field Detail

### DB_ENV_FILE_PATH

    public static final java.lang.String DB_ENV_FILE_PATH

### DB_ENV_OVERLAY_PATH

    public static final java.lang.String DB_ENV_OVERLAY_PATH

### DB_ENV_CACHE_PATH

    public static final java.lang.String DB_ENV_CACHE_PATH

### DBN_QUERY_CACHE

    public static final java.lang.String DBN_QUERY_CACHE

See Also:
  Constant Field Values

Method Detail

### getInstance

    public static PersistentDBController getInstance(java.lang.String dbEnvFile,
                                                     boolean readOnly)
                                              throws PersistentDBException

  Set up the environment once

  Throws:
    `PersistentDBException`

### createDB

    public PersistentDB createDB(java.lang.String dbName,
                                 boolean duplicateAllowed,
                                 com.sleepycat.bind.EntryBinding valBinder)

  Create a new persistent database

### getDatabaseNames

    public java.lang.String[] getDatabaseNames()

  Get a list of db names

### removeDB

    public void removeDB(java.lang.String dbName)

  Delete database

### getSerialEntryBinding

    public com.sleepycat.bind.EntryBinding getSerialEntryBinding(java.lang.Class userCls)

  Return serial-type entry binding

### getEnv

    public com.sleepycat.je.Environment getEnv()

  Return the database environment Needed for things like beginning transactions

### getDB

    public com.sleepycat.je.Database getDB(java.lang.String dbName)

  Return reference to a created database object

### getNameIndexDB

    public com.sleepycat.je.SecondaryDatabase getNameIndexDB()

  Return reference to the secondary database (used for indexing)

### getClassCatalog

    public com.sleepycat.bind.serial.StoredClassCatalog getClassCatalog()

  The class datalog

### close

    public void close()

  Close the environment

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