org.exolab.castor.jdo.engine
public class DatabaseImpl extends Object implements Database, Synchronization
Version: $Revision: 1.29 $ $Date: 2005/11/10 15:59:50 $
Field Summary | |
---|---|
protected TransactionContext | _ctx
The transaction context is this database was accessed with an
javax.transaction.xa.XAResource. |
protected PersistenceInfoGroup | _scope
The database engine used to access the underlying SQL database. |
Constructor Summary | |
---|---|
DatabaseImpl(String dbName, int lockTimeout, CallbackInterceptor callback, InstanceFactory instanceFactory, Transaction transaction, ClassLoader classLoader, boolean autoStore) |
Method Summary | |
---|---|
void | afterCompletion(int status) |
void | beforeCompletion() |
void | begin() |
void | close() |
void | commit() |
void | create(Object object) |
void | expireCache(Class[] type, Object[] identity)
Expire objects from the cache. |
protected void | finalize()
Overrides Object.finalize().
|
CacheManager | getCacheManager() |
ClassLoader | getClassLoader()
Gets the current application ClassLoader's instance.
|
String | getDatabaseName() }
Return the name of the database |
Object | getIdentity(Object object) |
Connection | getJdbcConnection()
Get the underlying JDBC Connection.
|
LockEngine | getLockEngine() |
OQLQuery | getOQLQuery() |
OQLQuery | getOQLQuery(String oql) |
Query | getQuery() |
PersistenceInfoGroup | getScope() |
protected TransactionContext | getTransaction() |
boolean | isActive() |
boolean | isAutoStore()
Return if the current transaction is set to autoStore, it there is
transaction active. |
boolean | isClosed() |
boolean | isPersistent(Object object) |
Object | load(Class type, Object identity) |
Object | load(Class type, Object identity, Object object) |
Object | load(Class type, Object identity, short accessMode) |
Object | load(Class type, Object identity, AccessMode mode) |
void | lock(Object object) |
void | remove(Object object) |
void | rollback() |
void | setAutoStore(boolean autoStore)
True if user prefer all reachable object to be stored automatically.
|
void | setTxMap(TxDatabaseMap txMap) |
String | toString() |
void | update(Object object) |
Deprecated: Please use the new CacheManager which can be obtained by calling getCacheManager.
Expire objects from the cache. Objects expired from the cache will be read from persistent storage, as opposed to being read from the performance cache, during subsequent load/query operations. Objects may be expired from the cache individually, using explicit type/identity pairs in the argument list, or whole classes of objects may be expired by specifying a class type without a corresponding entry in the identity array. Objects contained within a "master" object, for example objects maintained in a one-to-many relationship, will automatically be expired from the cache without the need to explicitly identify them. This does not apply when expiring objects by type. Each type, both container and contained objects need to be specified.Parameters: type An array of class types. identity An array of object identifiers.
Throws: PersistenceException Indicates that a problem has occured expiring objects from the cache.
See Also: java.lang.Object#finalize()
See Also: getCacheManager
Returns: the current ClassLoader's instance, or null
if not provided
Returns: Name of the database.
Returns: the underlying JDBC connection, if possible
Throws: PersistenceException If the underlying JDBC connection cannot be obtained.
Returns: True if 'auto-store' mode is in use.
Parameters: autoStore True to indicate that 'autoStore' mode should be used.