org.axiondb

Interface Database

public interface Database

An Axion database.

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

Author: Rodney Waldhoff Chuck Burdick Amrish Lal Ahimanikya Satapathy

Field Summary
static StringCOMMIT_SIZE
Method Summary
voidaddDatabaseModificationListener(DatabaseModificationListener l)
Adds a listener to receive events on this database
voidaddIndex(Index index, Table table)
Add the given Indexto this database, associated with the given table.
voidaddIndex(Index index, Table table, boolean doPopulate)
Add the given Indexto this database, associating it with the given table and (optionally) populating it.
voidaddTable(Table table)
Add the given Tableto this database.
voidcheckpoint()
Make sure any modified state or data has been written to disk.
voidcreateDatabaseLink(DatabaseLink dblink)
voidcreateSequence(Sequence seq)
Create a numeric sequence
voiddropDatabaseLink(String name)
voiddropDependentExternalDBTable(List tables)
voiddropDependentViews(List views)
voiddropIndex(String name)
Drop the given Indexfrom this database.
voiddropSequence(String name)
Drop the specified Sequencefrom this database.
voiddropTable(String name)
Drop the specified Tablefrom this database.
DatabaseLinkgetDatabaseLink(String name)
ListgetDatabaseModificationListeners()
Returns all listeners set to receive events on this database
DataTypegetDataType(String name)
Get the DataTypecurrently registered for the given name, or null.
FilegetDBDirectory()
Get the directory into which table information is stored, or null.
ListgetDependentExternalDBTable(String name)
ListgetDependentViews(String tableName)
ConcreteFunctiongetFunction(String name)
ObjectgetGlobalVariable(String key)
IndexFactorygetIndexFactory(String name)
Get the IndexFactorycurrently registered for the given name, or null.
StringgetName()
Returns the name of this Database.
SequencegetSequence(String name)
Get the specified Sequence, or null if no such sequence can be found.
TablegetTable(String name)
Get the specified Table, or null if no such table can be found.
TablegetTable(TableIdentifier table)
Get the specified Table, or null if no such table can be found.
TableFactorygetTableFactory(String name)
Get the TableFactorycurrently registered for the given name, or null.
TransactionManagergetTransactionManager()
Get the TransactionManagerfor this database.
booleanhasDatabaseLink(String name)
booleanhasIndex(String name)
Returns true iff the given Indexexists.
booleanhasSequence(String name)
booleanhasTable(String name)
booleanhasTable(TableIdentifier table)
booleanisReadOnly()
Is this database read-only?
voidmigrate(int version)
Migrate from older version to newer version for this database
voidremount(File newdir)
Notify this database that its root directory has been moved to the given location.
voidrenameTable(String oldName, String newName)
voidshutdown()
Close this database and free any resources associated with it.
voidtableAltered(Table t)
Update metadata tables since this table has changed.

Field Detail

COMMIT_SIZE

public static String COMMIT_SIZE

Method Detail

addDatabaseModificationListener

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

addIndex

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

addIndex

public void addIndex(Index index, Table table, boolean doPopulate)
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

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

checkpoint

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

createDatabaseLink

public void createDatabaseLink(DatabaseLink dblink)

createSequence

public void createSequence(Sequence seq)
Create a numeric sequence

dropDatabaseLink

public void dropDatabaseLink(String name)

dropDependentExternalDBTable

public void dropDependentExternalDBTable(List tables)

dropDependentViews

public void dropDependentViews(List views)

dropIndex

public void dropIndex(String name)
Drop the given Indexfrom this database.

dropSequence

public void dropSequence(String name)
Drop the specified Sequencefrom this database.

Sequence name matching is case-insensitive.

dropTable

public void dropTable(String name)
Drop the specified Tablefrom this database.

Table name matching is case-insensitive.

getDatabaseLink

public DatabaseLink getDatabaseLink(String name)

getDatabaseModificationListeners

public List getDatabaseModificationListeners()
Returns all listeners set to receive events on this database

getDataType

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

getDBDirectory

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

getDependentExternalDBTable

public List getDependentExternalDBTable(String name)

getDependentViews

public List getDependentViews(String tableName)

getFunction

public ConcreteFunction getFunction(String name)

getGlobalVariable

public Object getGlobalVariable(String key)

getIndexFactory

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

getName

public String getName()
Returns the name of this Database.

getSequence

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

Sequence name matching is case-insensitive.

getTable

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

Table name matching is case-insensitive.

getTable

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

Table name matching is case-insensitive.

getTableFactory

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

getTransactionManager

public TransactionManager getTransactionManager()
Get the TransactionManagerfor this database.

hasDatabaseLink

public boolean hasDatabaseLink(String name)

hasIndex

public boolean hasIndex(String name)
Returns true iff the given Indexexists.

hasSequence

public boolean hasSequence(String name)

hasTable

public boolean hasTable(String name)

hasTable

public boolean hasTable(TableIdentifier table)

isReadOnly

public boolean isReadOnly()
Is this database read-only?

migrate

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

remount

public void remount(File newdir)
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.)

renameTable

public void renameTable(String oldName, String newName)

shutdown

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

tableAltered

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