|
||||||||||
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 TransactionExt
anObject
- Object to be markedpublic void markDirty(java.lang.Object anObject)
TransactionExt
markDirty
in interface TransactionExt
anObject
- 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 TransactionExt
public PersistenceBroker getBroker()
getBroker
in interface HasBroker
public void join()
join
in interface Transaction
public void leave()
leave
in interface Transaction
public void begin()
begin
in interface Transaction
public boolean isOpen()
isOpen
in interface Transaction
public void commit()
commit
in interface Transaction
public void abort()
abort
in interface Transaction
public void checkpoint()
checkpoint
in interface Transaction
public void lock(java.lang.Object obj, int lockMode) throws LockNotGrantedException
lock
in interface Transaction
obj
- 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 Transaction
obj
- 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
PersistenceBrokerException
public void setImplicitLocking(boolean value)
TransactionExt
setImplicitLocking
in interface TransactionExt
value
- 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 |