The database management object interface. This class implementing this
interface manages the database connections for one application.
version: $Revision: 1.2 $ author: Paul Morgan
Field Summary
boolean
debug Flag to enable debug logging of queries and transactions.
allocateObjectId(String dbName) Allocate an object id from the specified logical database.
Parameters: dbName - Logical name of the database from which to obtain an object id.
allocateObjectId() Allocate an object id from the specified logical database.
The allocated connection object. exception: DatabaseManagerException - If a nonexistent default logical database has been set. exception: ObjectIdException - If a problem (e.g.
createQuery(String dbName) Create a query object for the specified logical database.
Parameters: dbName - Logical name of the database from which to obtain a query.
createTransaction(String dbName) Create a transaction object for the specified logical database.
Parameters: dbName - Logical name of the database from which to obtain a transaction.
getMaxConnectionCount(String dbName) Returns the maximum number of concurent connections that existed
at any time since this object was created, or
resetMaxConnectionCount() was called.
This is a historical highwater mark.
logicalDatabaseType(String dbName) Return a logical database type for the default logical database.
Parameters: dbName - Logical name of the database from which to obtain a query.
Allocate a connection to the specified logic database. The
connection should be returned to the pool by calling its
release() function. A thread will wait if no connections
are available. Interupted exceptions are converted to errors.
Parameters: dbName - Logical name of the database to allocate a connection to. The allocated connection object. exception: DatabaseManagerException - If a nonexistent logical database name is supplied. exception: SQLException - If a SQL error occures.
Allocate a connection to the default logical database. The
connection should be returned to the pool by calling its
release() function. A thread will wait if no connections
are available. Interupted exceptions are converted to errors.
The allocated connection object. exception: DatabaseManagerException - If a nonexistent default logical database name is supplied. exception: SQLException - If a SQL error occures. See Also:DatabaseManager.setDefaultDatabase
Allocate an object id from the specified logical database.
Parameters: dbName - Logical name of the database from which to obtain an object id. The allocated unique OID exception: DatabaseManagerException - If a nonexistent logical database name is supplied. exception: ObjectIdException - If a problem (e.g. SQL error) occured in obtaining the OID.
Allocate an object id from the specified logical database.
The allocated connection object. exception: DatabaseManagerException - If a nonexistent default logical database has been set. exception: ObjectIdException - If a problem (e.g. SQL error) occured in obtaining the OID. See Also:DatabaseManager.setDefaultDatabase
Check does oid belong to Object id's range [minOId, currentOId]
Parameters: dbName - Logical name of the database from which to check an object id. Parameters: oid - oid which will be checked. exception: DatabaseManagerException - If a nonexistent logical database name is supplied. exception: ObjectIdException - If a oid does't belong to range.
Check does oid belong to Object id's range [minOId, currentOId] for default database
Parameters: oid - oid which will be checked. exception: DatabaseManagerException - If a nonexistent default logical database has been set. exception: ObjectIdException - If a oid does't belong to range.
Create a query object for the specified logical database.
Parameters: dbName - Logical name of the database from which to obtain a query. The query exception: DatabaseManagerException - If a nonexistent or invalid logical database name is supplied. exception: SQLException - If a problem occured creating the query.
Create a transaction object for the specified logical database.
Parameters: dbName - Logical name of the database from which to obtain a transaction. The transaction exception: DatabaseManagerException - If a nonexistent or invalid logical database name is supplied. exception: SQLException - If a problem occured creating the transaction.
Create a transaction object for the default logical database.
The transaction exception: DatabaseManagerException - If a nonexistent default logical database has been set. exception: SQLException - If a problem occured creating the transaction. See Also:DatabaseManager.setDefaultDatabase
Returns the number of currently active connections for the
supplied logical database name.
If not implemented, then -1 is returned.
Parameters: dbName - The logical database name.The number of currently active connections. exception: DatabaseManagerException - If a nonexistent logical database name is supplied.
Returns the maximum number of concurent connections that existed
at any time since this object was created, or
resetMaxConnectionCount() was called.
This is a historical highwater mark.
If not implemented, then -1 is returned.
Parameters: dbName - The logical database name.The highwater mark for number of connections, or -1. exception: DatabaseManagerException - If a nonexistent logical database name is supplied.
Returns the time when the maximum refered to by
maxConnectionCount() occured.
If not implemented, then null is returned.
Parameters: dbName - The logical database name.The Date of when the maximum number of connections occured. exception: DatabaseManagerException - If a nonexistent logical database name is supplied.
Returns the number of requests made to the database since startup time.
Parameters: dbName - The logical database name.The number of database requests since the server started. exception: DatabaseManagerException - If a nonexistent logical database name is supplied.
Returns a description of the logical database type.
Parameters: dbName - The logical database name.A text description of the logical database type. exception: DatabaseManagerException - If a nonexistent logical database name is supplied.
Return a logical database type for the default logical database.
Parameters: dbName - Logical name of the database from which to obtain a query. logical database type exception: DatabaseManagerException - If a nonexistent default logical database has been set. exception: SQLException - If a problem occured creating the query. See Also:DatabaseManager.setDefaultDatabase
Return a logical database type for the default logical database.
logical database type exception: DatabaseManagerException - If a nonexistent default logical database has been set. exception: SQLException - If a problem occured creating the query. See Also:DatabaseManager.setDefaultDatabase
Reset the maximum connection count. See
maxConnectionCount(). The highwater mark should be
reset to the current number of connections.
Parameters: dbName - The logical database name. exception: DatabaseManagerException - If a nonexistent logical database name is supplied.
Set the default logical database. This should be used with
caution, but it makes allocating connections easier.
Parameters: dbName - The default logical dabase name. exception: DatabaseManagerException - If a nonexistent or illegal logical database name is supplied.