|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.odmg.NarrowTransaction
Wraps Transaction in managed environments.
| Field Summary |
| Fields inherited from interface org.odmg.Transaction |
READ, UPGRADE, WRITE |
| Constructor Summary | |
NarrowTransaction(TransactionExt tx)
|
|
| Method Summary | |
void |
abort()
Abort the underlying odmg-transaction |
void |
begin()
Not supported!! |
void |
checkpoint()
Not supported!! |
void |
commit()
Not supported!! |
void |
flush()
Calling flush flushes persistent object modifications
made within the ODMG transaction since the last checkpoint to the underlying
database transaction, but does commit the database transaction. |
PersistenceBroker |
getBroker()
Return associated PB instance, or null if not found. |
java.lang.Object |
getObjectByIdentity(Identity id)
|
boolean |
isOpen()
Not supported!! |
void |
join()
Not supported!! |
void |
leave()
Not supported!! |
void |
lock(java.lang.Object obj,
int lockMode)
lock the given object |
void |
markDelete(java.lang.Object anObject)
marks an object for deletion without locking the object. |
void |
markDirty(java.lang.Object anObject)
marks an object as dirty without locking the object. |
void |
setImplicitLocking(boolean value)
This method can be used to activate or deactivate the implicit locking mechanism for the current transaction. |
boolean |
tryLock(java.lang.Object obj,
int lockMode)
lock the given object if possible |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NarrowTransaction(TransactionExt tx)
| Method Detail |
public void markDelete(java.lang.Object anObject)
TransactionExt
markDelete in interface TransactionExtanObject - Object to be markedpublic void markDirty(java.lang.Object anObject)
TransactionExt
markDirty in interface TransactionExtanObject - Object to be markedpublic void flush()
TransactionExt
Calling flush flushes persistent object modifications
made within the ODMG transaction since the last checkpoint to the underlying
database transaction, but does commit the database transaction.
The ODMG transaction retains all locks it held on those objects at the time the flush
was invoked.
Transaction.checkpoint().
flush in interface TransactionExtpublic PersistenceBroker getBroker()
getBroker in interface HasBrokerpublic void join()
join in interface Transactionpublic void leave()
leave in interface Transactionpublic void begin()
begin in interface Transactionpublic boolean isOpen()
isOpen in interface Transactionpublic void commit()
commit in interface Transactionpublic void abort()
abort in interface Transactionpublic void checkpoint()
checkpoint in interface Transaction
public void lock(java.lang.Object obj,
int lockMode)
throws LockNotGrantedException
lock in interface Transactionobj - The object to acquire a lock on.lockMode - The lock mode to acquire. The lock modes are READ,
UPGRADE, and WRITE.
LockNotGrantedException - Is thrown if the given lock mode could not be acquired.Transaction#lock
public boolean tryLock(java.lang.Object obj,
int lockMode)
tryLock in interface Transactionobj - The object to acquire a lock on.lockMode - The lock mode to acquire. The lock modes are READ,
UPGRADE, and WRITE.
Transaction#tryLock
public java.lang.Object getObjectByIdentity(Identity id)
throws PersistenceBrokerException
PersistenceBrokerExceptionpublic void setImplicitLocking(boolean value)
TransactionExt
setImplicitLocking in interface TransactionExtvalue - if set to true implicit locking is enabled,
if false, implicit locking is disabled.TransactionExt.setImplicitLocking(boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||