org.exolab.castor.jdo.engine

Class DatabaseImpl

public class DatabaseImpl extends Object implements Database, Synchronization

An implementation of the JDO database supporting explicit transaction demaracation.

Version: $Revision: 1.1.1.1 $ $Date: 2003/03/03 07:08:16 $

Author: Assaf Arkin

Field Summary
protected TransactionContext_ctx
The transaction context is this database was accessed with an {@link javax.transaction.xa.XAResource}.
protected PersistenceInfoGroup_scope
The database engine used to access the underlying SQL database.
Constructor Summary
DatabaseImpl(String dbName, int lockTimeout, LogInterceptor logInterceptor, CallbackInterceptor callback, InstanceFactory instanceFactory, Transaction transaction, ClassLoader classLoader, boolean autoStore)
Method Summary
voidafterCompletion(int status)
voidbeforeCompletion()
voidbegin()
voidcheckpoint()
voidclose()
voidcommit()
voidcreate(Object object)
voiddeletePersistent(Object object)
protected voidfinalize()
ClassLoadergetClassLoader()
Gets the current application ClassLoader's instance.
ObjectgetConnection()
Get the underlying JDBC Connection.
StringgetDatabaseName()
} Return the name of the database
ObjectgetIdentity(Object object)
LockEnginegetLockEngine()
OQLQuerygetOQLQuery()
OQLQuerygetOQLQuery(String oql)
QuerygetQuery()
PersistenceInfoGroupgetScope()
protected TransactionContextgetTransaction()
booleanisActive()
booleanisAutoStore()
booleanisClosed()
booleanisPersistent(Object object)
Objectload(Class type, Object identity, Object object)
Objectload(Class type, Complex identity)
Objectload(Class type, Object identity)
Objectload(Class type, Complex identity, short accessMode)
Objectload(Class type, Object identity, short accessMode)
voidlock(Object object)
voidmakePersistent(Object object)
voidremove(Object object)
voidrollback()
voidsetAutoStore(boolean autoStore)
voidsetTxMap(TxDatabaseMap txMap)
StringtoString()
voidupdate(Object object)

Field Detail

_ctx

protected TransactionContext _ctx
The transaction context is this database was accessed with an {@link javax.transaction.xa.XAResource}.

_scope

protected PersistenceInfoGroup _scope
The database engine used to access the underlying SQL database.

Constructor Detail

DatabaseImpl

public DatabaseImpl(String dbName, int lockTimeout, LogInterceptor logInterceptor, CallbackInterceptor callback, InstanceFactory instanceFactory, Transaction transaction, ClassLoader classLoader, boolean autoStore)

Method Detail

afterCompletion

public void afterCompletion(int status)

beforeCompletion

public void beforeCompletion()

begin

public void begin()

checkpoint

public void checkpoint()

Deprecated: Use {@link #commit} and {@link #rollback} instead

close

public void close()

commit

public void commit()

create

public void create(Object object)

deletePersistent

public void deletePersistent(Object object)

Deprecated:

finalize

protected void finalize()

getClassLoader

public ClassLoader getClassLoader()
Gets the current application ClassLoader's instance. For use in OQLQueryImpl and TransactionContext.

Returns: the current ClassLoader's instance, or null if not provided

getConnection

public Object getConnection()
Get the underlying JDBC Connection. Only for internal / advanced use ! Never try to close it (is done by castor).

getDatabaseName

public String getDatabaseName()
} Return the name of the database

getIdentity

public Object getIdentity(Object object)

getLockEngine

LockEngine getLockEngine()

getOQLQuery

public OQLQuery getOQLQuery()

getOQLQuery

public OQLQuery getOQLQuery(String oql)

getQuery

public Query getQuery()

getScope

public PersistenceInfoGroup getScope()

getTransaction

protected TransactionContext getTransaction()

isActive

public boolean isActive()

isAutoStore

public boolean isAutoStore()

isClosed

public boolean isClosed()

isPersistent

public boolean isPersistent(Object object)

load

public Object load(Class type, Object identity, Object object)

load

public Object load(Class type, Complex identity)

load

public Object load(Class type, Object identity)

load

public Object load(Class type, Complex identity, short accessMode)

load

public Object load(Class type, Object identity, short accessMode)

lock

public void lock(Object object)

makePersistent

public void makePersistent(Object object)

Deprecated:

remove

public void remove(Object object)

rollback

public void rollback()

setAutoStore

public void setAutoStore(boolean autoStore)

setTxMap

void setTxMap(TxDatabaseMap txMap)

toString

public String toString()

update

public void update(Object object)
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com