|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.axiondb.engine.BaseDatabase
public abstract class BaseDatabase
Abstract base Database
implementation.
Field Summary | |
---|---|
static java.lang.String |
SYSTABLE_DB_LINKS
|
static java.lang.String |
SYSTABLE_INDEX_INFO
|
Fields inherited from interface org.axiondb.Database |
---|
COMMIT_SIZE |
Constructor Summary | |
---|---|
BaseDatabase(java.lang.String name)
|
Method Summary | |
---|---|
void |
addDatabaseModificationListener(DatabaseModificationListener l)
Adds a listener to receive events on this database |
void |
addIndex(Index index,
Table table)
Add the given Index to this database, associated with the given table. |
void |
addIndex(Index index,
Table table,
boolean doPopulate)
Add the given Index to this database, associating it with the given table
and (optionally) populating it. |
void |
addTable(Table t)
Add the given Table to this database. |
void |
checkpoint()
Make sure any modified state or data has been written to disk. |
void |
createDatabaseLink(DatabaseLink dblink)
|
protected void |
createMetaDataTables()
Should get called by subclasses in constructors |
void |
createSequence(Sequence seq)
Create a numeric sequence |
protected abstract Table |
createSystemTable(java.lang.String name)
|
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 Index from this database. |
void |
dropSequence(java.lang.String name)
Drop the specified Sequence from this database. |
void |
dropTable(java.lang.String name)
Drop the specified Table from this database. |
protected static java.util.Properties |
getBaseProperties()
Callers should treat the returned Properties as immutable. |
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 DataType currently registered for the given name, 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 IndexFactory currently 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. |
protected int |
getSequenceCount()
|
protected java.util.Iterator<Sequence> |
getSequences()
|
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 TableFactory currently registered for the given name, or
null. |
protected java.util.Iterator<Table> |
getTables()
|
TransactionManager |
getTransactionManager()
Get the TransactionManager for this database. |
boolean |
hasDatabaseLink(java.lang.String name)
|
boolean |
hasIndex(java.lang.String name)
Returns true iff the given Index exists. |
boolean |
hasSequence(java.lang.String name)
|
boolean |
hasTable(java.lang.String name)
|
boolean |
hasTable(TableIdentifier id)
|
boolean |
isReadOnly()
Is this database read-only? |
protected void |
loadProperties(java.util.Properties props)
|
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 |
removeDatabaseModificationListener(DatabaseModificationListener l)
|
void |
renameTable(java.lang.String oldName,
java.lang.String newName)
|
Selectable |
resolveSelectSelectable(SubSelectCommand select,
TableIdentifier[] tables)
|
void |
shutdown()
Close this database and free any resources associated with it. |
void |
tableAltered(Table t)
Update metadata tables since this table has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.axiondb.Database |
---|
getDBDirectory |
Field Detail |
---|
public static final java.lang.String SYSTABLE_DB_LINKS
public static final java.lang.String SYSTABLE_INDEX_INFO
Constructor Detail |
---|
public BaseDatabase(java.lang.String name)
Method Detail |
---|
public void addDatabaseModificationListener(DatabaseModificationListener l)
Database
addDatabaseModificationListener
in interface Database
public void addIndex(Index index, Table table) throws AxionException
Database
Index
to this database, associated with the given table.
addIndex
in interface Database
AxionException
public void addIndex(Index index, Table table, boolean doPopulate) throws AxionException
Database
Index
to this database, associating it with the given table
and (optionally) populating it.
addIndex
in interface Database
index
- Index to be added and (optionally) populatedtable
- Table to be indexeddoPopulate
- true if index
should be populated by the
appropriate column in table
; false if index
should be left as-is.
AxionException
- if error occurs during addition and/or population of
index
public void addTable(Table t) throws AxionException
Database
Table
to this database.
addTable
in interface Database
AxionException
public void checkpoint() throws AxionException
Database
checkpoint
in interface Database
AxionException
public void createDatabaseLink(DatabaseLink dblink) throws AxionException
createDatabaseLink
in interface Database
AxionException
public void createSequence(Sequence seq) throws AxionException
Database
createSequence
in interface Database
AxionException
public void dropDatabaseLink(java.lang.String name) throws AxionException
dropDatabaseLink
in interface Database
AxionException
public void dropDependentExternalDBTable(java.util.List tables) throws AxionException
dropDependentExternalDBTable
in interface Database
AxionException
public void dropDependentViews(java.util.List views) throws AxionException
dropDependentViews
in interface Database
AxionException
public void dropIndex(java.lang.String name) throws AxionException
Database
Index
from this database.
dropIndex
in interface Database
AxionException
public void dropSequence(java.lang.String name) throws AxionException
Database
Sequence
from this database.
Sequence name matching is case-insensitive.
dropSequence
in interface Database
AxionException
public void dropTable(java.lang.String name) throws AxionException
Database
Table
from this database.
Table name matching is case-insensitive.
dropTable
in interface Database
AxionException
public DatabaseLink getDatabaseLink(java.lang.String name)
getDatabaseLink
in interface Database
public java.util.List getDatabaseModificationListeners()
Database
getDatabaseModificationListeners
in interface Database
public DataType getDataType(java.lang.String name)
Database
DataType
currently registered for the given name, or null.
getDataType
in interface Database
public java.util.List getDependentExternalDBTable(java.lang.String name)
getDependentExternalDBTable
in interface Database
public java.util.List getDependentViews(java.lang.String tableName)
getDependentViews
in interface Database
public ConcreteFunction getFunction(java.lang.String name)
getFunction
in interface Database
public java.lang.Object getGlobalVariable(java.lang.String key)
getGlobalVariable
in interface Database
public IndexFactory getIndexFactory(java.lang.String name)
Database
IndexFactory
currently registered for the given name, or
null.
getIndexFactory
in interface Database
public java.lang.String getName()
Database
Database
.
getName
in interface Database
public Sequence getSequence(java.lang.String name)
Database
Sequence
, or null if no such sequence can be
found.
Sequence name matching is case-insensitive.
getSequence
in interface Database
public Table getTable(java.lang.String name) throws AxionException
Database
Table
, or null if no such table can be found.
Table name matching is case-insensitive.
getTable
in interface Database
AxionException
public Table getTable(TableIdentifier table) throws AxionException
Database
Table
, or null if no such table can be found.
Table name matching is case-insensitive.
getTable
in interface Database
AxionException
public TableFactory getTableFactory(java.lang.String name)
Database
TableFactory
currently registered for the given name, or
null.
getTableFactory
in interface Database
public TransactionManager getTransactionManager()
Database
TransactionManager
for this database.
getTransactionManager
in interface Database
public boolean hasDatabaseLink(java.lang.String name) throws AxionException
hasDatabaseLink
in interface Database
AxionException
public boolean hasIndex(java.lang.String name) throws AxionException
Database
true
iff the given Index
exists.
hasIndex
in interface Database
AxionException
public boolean hasSequence(java.lang.String name) throws AxionException
hasSequence
in interface Database
AxionException
public boolean hasTable(java.lang.String name) throws AxionException
hasTable
in interface Database
AxionException
public boolean hasTable(TableIdentifier id) throws AxionException
hasTable
in interface Database
AxionException
public boolean isReadOnly()
Database
isReadOnly
in interface Database
public void migrate(int version) throws AxionException
migrate
in interface Database
AxionException
public void remount(java.io.File newdir) throws AxionException
Database
remount
in interface Database
AxionException
public void removeDatabaseModificationListener(DatabaseModificationListener l)
public void renameTable(java.lang.String oldName, java.lang.String newName) throws AxionException
renameTable
in interface Database
AxionException
public Selectable resolveSelectSelectable(SubSelectCommand select, TableIdentifier[] tables)
public void shutdown() throws AxionException
Database
shutdown
in interface Database
AxionException
public void tableAltered(Table t) throws AxionException
Database
tableAltered
in interface Database
AxionException
protected void createMetaDataTables() throws AxionException
AxionException
protected abstract Table createSystemTable(java.lang.String name)
protected int getSequenceCount()
protected java.util.Iterator<Sequence> getSequences()
protected java.util.Iterator<Table> getTables()
protected void loadProperties(java.util.Properties props) throws AxionException
AxionException
protected static java.util.Properties getBaseProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |