dbXML API

## com.dbxml.db.core
Class Database

    java.lang.Object
      com.dbxml.db.core.CollectionManager
          com.dbxml.db.core.Collection
              com.dbxml.db.core.Database

All Implemented Interfaces:
  Configurable

Direct Known Subclasses:
  EmbeddedDatabase

public class Database
extends Collection

The Database class, which is also a Collection class, serves as the top level container for a dbXML database. It provides additional capabilities such as providing access to the system collections, symbol tables, and security manager. It is also the class that is used to bootstrap the database and the collections therein.

Field Summary
`static Database` `database`

Fields inherited from class com.dbxml.db.core.Collection
`TYPE_DOCUMENTS, TYPE_RECORDS`

Constructor Summary
`Database()`

Method Summary
`void` `addDatabaseEventListener(DatabaseEventListener listener)`
`void` `dispose()` dispose closes the Collection's associated Filer and Indexes.
`void` `flushConfig()` flushConfig ensures that the Collection configuration has been properly flushed to disk after a modification.
`Cache` `getCache()` getCache returns the Database-level Cache.
`Database` `getDatabase()` getDatabase retrieves the Database that is associated with this CollectionManager.
`static Database` `getInstance()`
`QueryEngine` `getQueryEngine()` getQueryEngine returns a reference to the Database's QueryEngine.
`SecurityManager` `getSecurityManager()` getSecurityManager returns a reference to the Database's SecurityManager.
`SystemCollection` `getSystemCollection()` getSystemCollection returns the System Collection.
`boolean` `isDatabaseEmbedded()`
`void` `removeDatabaseEventListener(DatabaseEventListener listener)`
`void` `setConfig(Configuration config)` setConfig sets the configuration information for the Configurable object instance.

Methods inherited from class com.dbxml.db.core.Collection

`createCollection, createNewOID, drop, dropCollection, flushSymbolTable, getCanonicalDocumentName, getCanonicalName, getCollectionRoot, getCollectionType, getContainer, getContainerSet, getDocument, getExtensionManager, getIndexManager, getKeyCount, getName, getParentCollection, getRecord, getRecordMetaData, getSymbols, getTriggerManager, insertDocument, insertRecord, listKeys, queryCollection, queryDocument, remove, setDocument, setRecord, setRecord`

Methods inherited from class com.dbxml.db.core.CollectionManager
`getCollection, getConfig, listCollections`

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

Methods inherited from interface com.dbxml.util.Configurable
`getConfig`

Field Detail

### database

    public static Database database

Constructor Detail

### Database

    public Database()
             throws DBException

Method Detail

### getInstance

    public static Database getInstance()

### setConfig

    public void setConfig(Configuration config)
                   throws dbXMLException

  Description copied from interface: `Configurable`
  setConfig sets the configuration information for the Configurable object instance.

  Specified by:
    `setConfig` in interface `Configurable`
  Overrides:
    `setConfig` in class `Collection`
  Throws:
    `dbXMLException`

### isDatabaseEmbedded

    public boolean isDatabaseEmbedded()

### addDatabaseEventListener

    public void addDatabaseEventListener(DatabaseEventListener listener)

### removeDatabaseEventListener

    public void removeDatabaseEventListener(DatabaseEventListener listener)

### getSystemCollection

    public SystemCollection getSystemCollection()

  Description copied from class: `CollectionManager`
  getSystemCollection returns the System Collection.

  Overrides:
    `getSystemCollection` in class `Collection`

### getDatabase

    public Database getDatabase()

  Description copied from class: `CollectionManager`
  getDatabase retrieves the Database that is associated with this CollectionManager.

  Overrides:
    `getDatabase` in class `Collection`

### flushConfig

    public void flushConfig()
                     throws DBException

  flushConfig ensures that the Collection configuration has been properly flushed to disk after a modification.

  Throws:
    `DBException`

### getCache

    public Cache getCache()

  getCache returns the Database-level Cache.

  Returns:
    The Cache

### getQueryEngine

    public QueryEngine getQueryEngine()

  getQueryEngine returns a reference to the Database's QueryEngine.

  Overrides:
    `getQueryEngine` in class `Collection`
  Returns:
    The QueryEngine instance

### getSecurityManager

    public SecurityManager getSecurityManager()

  getSecurityManager returns a reference to the Database's SecurityManager.

  Returns:
    The SecurityManager instance

### dispose

    public void dispose()

  Description copied from class: `Collection`
  dispose closes the Collection's associated Filer and Indexes. It also recursively calls dispose on the Collection's child Collections.

  Overrides:
    `dispose` in class `Collection`

dbXML API

Copyright (c) 2004 The dbXML Group