org.axiondb
Interface Database

All Known Subinterfaces:
Transaction
All Known Implementing Classes:
BaseDatabase, DiskDatabase, MemoryDatabase, SnapshotIsolationTransaction

public interface Database

An Axion database.

Version:
$Revision: 1.40 $ $Date: 2005/12/20 18:32:40 $

Field Summary
static java.lang.String COMMIT_SIZE
           
 
Method Summary
 void addDatabaseModificationListener(DatabaseModificationListener l)
          Adds a listener to receive events on this database
 void addIndex(Index index, Table table)
          Add the given Indexto this database, associated with the given table.
 void addIndex(Index index, Table table, boolean doPopulate)
          Add the given Indexto this database, associating it with the given table and (optionally) populating it.
 void addTable(Table table)
          Add the given Tableto this database.
 void checkpoint()
          Make sure any modified state or data has been written to disk.
 void createDatabaseLink(DatabaseLink dblink)
           
 void createSequence(Sequence seq)
          Create a numeric sequence
 void dropDatabaseLink(java.lang.String name)
           
 void dropDependentExternalDBTable(java.util.List tables)
           
 void dropDependentViews(java.util.List views)
           
 void dropIndex(java.lang.String name)
          Drop the given Indexfrom this database.
 void dropSequence(java.lang.String name)
          Drop the specified Sequencefrom this database.
 void dropTable(java.lang.String name)
          Drop the specified Tablefrom this database.
 DatabaseLink getDatabaseLink(java.lang.String name)
           
 java.util.List getDatabaseModificationListeners()
          Returns all listeners set to receive events on this database
 DataType getDataType(java.lang.String name)
          Get the DataTypecurrently registered for the given name, or null.
 java.io.File getDBDirectory()
          Get the directory into which table information is stored, or null.
 java.util.List getDependentExternalDBTable(java.lang.String name)
           
 java.util.List getDependentViews(java.lang.String tableName)
           
 ConcreteFunction getFunction(java.lang.String name)
           
 java.lang.Object getGlobalVariable(java.lang.String key)
           
 IndexFactory getIndexFactory(java.lang.String name)
          Get the IndexFactorycurrently registered for the given name, or null.
 java.lang.String getName()
          Returns the name of this Database.
 Sequence getSequence(java.lang.String name)
          Get the specified Sequence, or null if no such sequence can be found.
 Table getTable(java.lang.String name)
          Get the specified Table, or null if no such table can be found.
 Table getTable(TableIdentifier table)
          Get the specified Table, or null if no such table can be found.
 TableFactory getTableFactory(java.lang.String name)
          Get the TableFactorycurrently registered for the given name, or null.
 TransactionManager getTransactionManager()
          Get the TransactionManagerfor this database.
 boolean hasDatabaseLink(java.lang.String name)
           
 boolean hasIndex(java.lang.String name)
          Returns true iff the given Indexexists.
 boolean hasSequence(java.lang.String name)
           
 boolean hasTable(java.lang.String name)
           
 boolean hasTable(TableIdentifier table)
           
 boolean isReadOnly()
          Is this database read-only?
 void migrate(int version)
          Migrate from older version to newer version for this database
 void remount(java.io.File newdir)
          Notify this database that its root directory has been moved to the given location.
 void renameTable(java.lang.String oldName, java.lang.String newName)
           
 void shutdown()
          Close this database and free any resources associated with it.
 void tableAltered(Table t)
          Update metadata tables since this table has changed.
 

Field Detail

COMMIT_SIZE

static final java.lang.String COMMIT_SIZE
See Also:
Constant Field Values
Method Detail

addDatabaseModificationListener

void addDatabaseModificationListener(DatabaseModificationListener l)
Adds a listener to receive events on this database


addIndex

void addIndex(Index index,
              Table table)
              throws AxionException
Add the given Indexto this database, associated with the given table.

Throws:
AxionException

addIndex

void addIndex(Index index,
              Table table,
              boolean doPopulate)
              throws AxionException
Add the given Indexto this database, associating it with the given table and (optionally) populating it.

Parameters:
index - Index to be added and (optionally) populated
table - Table to be indexed
doPopulate - true if index should be populated by the appropriate column in table; false if index should be left as-is.
Throws:
AxionException - if error occurs during addition and/or population of index

addTable

void addTable(Table table)
              throws AxionException
Add the given Tableto this database.

Throws:
AxionException

checkpoint

void checkpoint()
                throws AxionException
Make sure any modified state or data has been written to disk.

Throws:
AxionException

createDatabaseLink

void createDatabaseLink(DatabaseLink dblink)
                        throws AxionException
Throws:
AxionException

createSequence

void createSequence(Sequence seq)
                    throws AxionException
Create a numeric sequence

Throws:
AxionException

dropDatabaseLink

void dropDatabaseLink(java.lang.String name)
                      throws AxionException
Throws:
AxionException

dropDependentExternalDBTable

void dropDependentExternalDBTable(java.util.List tables)
                                  throws AxionException
Throws:
AxionException

dropDependentViews

void dropDependentViews(java.util.List views)
                        throws AxionException
Throws:
AxionException

dropIndex

void dropIndex(java.lang.String name)
               throws AxionException
Drop the given Indexfrom this database.

Throws:
AxionException

dropSequence

void dropSequence(java.lang.String name)
                  throws AxionException
Drop the specified Sequencefrom this database.

Sequence name matching is case-insensitive.

Throws:
AxionException

dropTable

void dropTable(java.lang.String name)
               throws AxionException
Drop the specified Tablefrom this database.

Table name matching is case-insensitive.

Throws:
AxionException

getDatabaseLink

DatabaseLink getDatabaseLink(java.lang.String name)

getDatabaseModificationListeners

java.util.List getDatabaseModificationListeners()
Returns all listeners set to receive events on this database


getDataType

DataType getDataType(java.lang.String name)
Get the DataTypecurrently registered for the given name, or null.


getDBDirectory

java.io.File getDBDirectory()
Get the directory into which table information is stored, or null.


getDependentExternalDBTable

java.util.List getDependentExternalDBTable(java.lang.String name)

getDependentViews

java.util.List getDependentViews(java.lang.String tableName)

getFunction

ConcreteFunction getFunction(java.lang.String name)

getGlobalVariable

java.lang.Object getGlobalVariable(java.lang.String key)

getIndexFactory

IndexFactory getIndexFactory(java.lang.String name)
Get the IndexFactorycurrently registered for the given name, or null.


getName

java.lang.String getName()
Returns the name of this Database.


getSequence

Sequence getSequence(java.lang.String name)
Get the specified Sequence, or null if no such sequence can be found.

Sequence name matching is case-insensitive.


getTable

Table getTable(java.lang.String name)
               throws AxionException
Get the specified Table, or null if no such table can be found.

Table name matching is case-insensitive.

Throws:
AxionException

getTable

Table getTable(TableIdentifier table)
               throws AxionException
Get the specified Table, or null if no such table can be found.

Table name matching is case-insensitive.

Throws:
AxionException

getTableFactory

TableFactory getTableFactory(java.lang.String name)
Get the TableFactorycurrently registered for the given name, or null.


getTransactionManager

TransactionManager getTransactionManager()
Get the TransactionManagerfor this database.


hasDatabaseLink

boolean hasDatabaseLink(java.lang.String name)
                        throws AxionException
Throws:
AxionException

hasIndex

boolean hasIndex(java.lang.String name)
                 throws AxionException
Returns true iff the given Indexexists.

Throws:
AxionException

hasSequence

boolean hasSequence(java.lang.String name)
                    throws AxionException
Throws:
AxionException

hasTable

boolean hasTable(java.lang.String name)
                 throws AxionException
Throws:
AxionException

hasTable

boolean hasTable(TableIdentifier table)
                 throws AxionException
Throws:
AxionException

isReadOnly

boolean isReadOnly()
Is this database read-only?


migrate

void migrate(int version)
             throws AxionException
Migrate from older version to newer version for this database

Throws:
AxionException

remount

void remount(java.io.File newdir)
             throws AxionException
Notify this database that its root directory has been moved to the given location. (E.g., the CD containing the data for a CD-resident database has changed drives.)

Throws:
AxionException

renameTable

void renameTable(java.lang.String oldName,
                 java.lang.String newName)
                 throws AxionException
Throws:
AxionException

shutdown

void shutdown()
              throws AxionException
Close this database and free any resources associated with it.

Throws:
AxionException

tableAltered

void tableAltered(Table t)
                  throws AxionException
Update metadata tables since this table has changed.

Throws:
AxionException