org.exolab.castor.jdo.engine
public abstract class AbstractDatabaseImpl extends Object implements Database
Version: $Revision: 6230 $ $Date: 2006-04-22 11:05:30 -0600 (Sat, 22 Apr 2006) $
Field Summary | |
---|---|
protected boolean | _autoStore
True if user prefer all reachable object to be stored automatically. |
protected CallbackInterceptor | _callback
The default callback interceptor for transaction |
protected ClassLoader | _classLoader
The class loader for application classes (may be null). |
protected TransactionContext | _ctx
The transaction context is this database was accessed with an
javax.transaction.xa.XAResource. |
protected String | _dbName
The name of this database. |
protected InstanceFactory | _instanceFactory
The instance factory to that creates new instances of data object |
protected int | _lockTimeout
The lock timeout for this database. |
protected PersistenceInfoGroup | _scope
The database engine used to access the underlying SQL database. |
Constructor Summary | |
---|---|
AbstractDatabaseImpl(String dbName, int lockTimeout, CallbackInterceptor callback, InstanceFactory instanceFactory, ClassLoader classLoader, boolean autoStore)
Creates an instance of this class |
Method Summary | |
---|---|
abstract void | begin() |
abstract void | close() |
abstract void | commit() |
void | create(Object object) |
CacheManager | getCacheManager() |
ClassLoader | getClassLoader()
Gets the current application ClassLoader's instance. |
TransactionContext | getCurrentTransaction()
Gets the current Castor transaction in use. |
String | getDatabaseName()
Return the name of the database |
Identity | getIdentity(Object object) |
abstract Connection | getJdbcConnection() |
LockEngine | getLockEngine()
Returns the LockEngine in use by this database instance. |
OQLQuery | getNamedQuery(String name) |
OQLQuery | getOQLQuery() |
OQLQuery | getOQLQuery(String oql) |
Query | getQuery() |
PersistenceInfoGroup | getScope() |
protected TransactionContext | getTransaction()
Returns the currently active transaction, if any. |
boolean | isActive() |
boolean | isAutoStore()
Return if the current transaction is set to autoStore, it there is
transaction active. |
boolean | isClosed() |
boolean | isLocked(Class cls, Object identity) |
boolean | isPersistent(Object object) |
Object | load(Class type, Object identity) |
Object | load(Class type, Object identity, Object object) |
Object | load(Class type, Object identity, AccessMode mode) |
protected void | loadSynchronizables()
Load the TxSynchronizable implementations from the
properties file, if not loaded before. |
void | lock(Object object) |
protected void | registerSynchronizables()
Register the TxSynchronizable implementations at the
TransactionContect at end of begin(). |
void | remove(Object object) |
abstract void | rollback() |
void | setAutoStore(boolean autoStore)
Indicates whether user prefer all reachable object to be stored automatically;
false if user wants dependent object only to be stored. |
String | toString() |
protected void | unregisterSynchronizables()
Unregister the TxSynchronizable implementations at the
TransactionContect after commit() or rollback(). |
void | update(Object object) |
Parameters: dbName Name of the database. lockTimeout Lock timeout to use callback Callback interceptors instanceFactory Instance factory classLoader Current class loader. autoStore True if auto storing is enabled.
Throws: DatabaseNotFoundException If there's no database configuration for the given name.
See Also: begin
UNKNOWN:
See Also: close
UNKNOWN:
See Also: commit
UNKNOWN:
See Also: Database
UNKNOWN:
See Also: getCacheManager
UNKNOWN:
Returns: the current ClassLoader's instance, or null
if not provided
Returns: the current Castor
Throws: TransactionNotInProgressException If there's no transaction in progress.
Returns: Name of the database.
See Also: Database
UNKNOWN:
See Also: getJdbcConnection
UNKNOWN:
Returns: the LockEngine in use by this database instance.
See Also: Database
UNKNOWN:
See Also: getOQLQuery
UNKNOWN:
See Also: Database
UNKNOWN:
See Also: getQuery
UNKNOWN:
See Also: getScope
UNKNOWN:
Returns: The current active transaction.
Throws: TransactionNotInProgressException If there's no active transaction.
See Also: isActive
UNKNOWN:
Returns: True if 'auto-store' mode is in use.
See Also: isClosed
UNKNOWN:
See Also: Database
UNKNOWN:
See Also: Database
UNKNOWN:
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also:
{@inheritDoc }
See Also: Database
UNKNOWN:
See Also: Database
UNKNOWN:
See Also: rollback
UNKNOWN:
Parameters: autoStore True to indicate that 'autoStore' mode should be used.
See Also: java.lang.Object#toString()
UNKNOWN:
See Also: Database
UNKNOWN: