|
Oracle Application Server TopLink API Reference 10g Release 2 (10.1.2) B15903-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.toplink.jdo.JDOTransaction
JDO wrapper for a TopLink unit of work.
Method Summary | |
void |
begin() Begin a transaction. |
void |
commit() Commit the current transaction. |
boolean |
getNontransactionalRead() When the nontransactional read flag is set to false the PersistenceManager has a single TopLink UnitOfWork associated with it. |
boolean |
getNontransactionalWrite() If true, allows persistent instances to be written without a transaction active. |
boolean |
getOptimistic() Optimistic transactions do not hold data store locks until commit time. |
javax.jdo.PersistenceManager |
getPersistenceManager() The Tranansaction instance is always associated with exactly one PersistenceManager. |
boolean |
getRetainValues() If true, at commit time instances retain their field values. |
javax.transaction.Synchronization |
getSynchronization() The user-specified Synchronization instance for this Transaction instance. |
UnitOfWork |
getUnitOfWork() Return the associated TopLink unit of work. |
boolean |
isActive() Returns whether there is a transaction currently active. |
void |
rollback() Roll back the current transaction. |
void |
setNontransactionalRead(boolean nontransactionalRead) When the nontransactional read flag is set to false the PersistenceManager has a single TopLink UnitOfWork associated with it. |
void |
setNontransactionalWrite(boolean arg1) If true, allow persistent instances to be written without a transaction active. |
void |
setOptimistic(boolean arg1) Optimistic transactions do not hold data store locks until commit time. |
void |
setRetainValues(boolean arg1) If true, at commit instances retain their values and the instances transition to persistent-nontransactional. |
void |
setSynchronization(javax.transaction.Synchronization synchronizationListener) The user can specify a Synchronization instance to be notified on transaction completions. |
void |
setUnitOfWork(UnitOfWork newUnitOfWork) Set the associate unit of work. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void begin()
begin
in interface javax.jdo.Transaction
javax.jdo.JDOUserException
- if transactions are managed by a container in the managed environment, or if the transaction is already active.setOptimistic(boolean)
, getOptimistic()
public void commit()
commit
in interface javax.jdo.Transaction
javax.jdo.JDOUserException
- if transactions are managed by a container in the managed environment, or if the transaction is not active.public boolean getNontransactionalRead()
JDO: If true, allows persistent instances to be read without a transaction active.
getNontransactionalRead
in interface javax.jdo.Transaction
public boolean getNontransactionalWrite()
getNontransactionalWrite
in interface javax.jdo.Transaction
public boolean getOptimistic()
getOptimistic
in interface javax.jdo.Transaction
public javax.jdo.PersistenceManager getPersistenceManager()
getPersistenceManager
in interface javax.jdo.Transaction
public boolean getRetainValues()
getRetainValues
in interface javax.jdo.Transaction
public javax.transaction.Synchronization getSynchronization()
getSynchronization
in interface javax.jdo.Transaction
public boolean isActive()
isActive
in interface javax.jdo.Transaction
public void rollback()
rollback
in interface javax.jdo.Transaction
javax.jdo.JDOUserException
- if transactions are managed by a container in the managed environment, or if the transaction is not active.public void setNontransactionalRead(boolean nontransactionalRead)
JDO: If true, allow persistent instances to be read without a transaction active. If an implementation does not support this option, a JDOUnsupportedOptionException is thrown.
setNontransactionalRead
in interface javax.jdo.Transaction
nontransactionalRead
- the value of the nontransactionalRead propertypublic void setNontransactionalWrite(boolean arg1)
setNontransactionalWrite
in interface javax.jdo.Transaction
public void setOptimistic(boolean arg1)
setOptimistic
in interface javax.jdo.Transaction
public void setRetainValues(boolean arg1)
setRetainValues
in interface javax.jdo.Transaction
public void setSynchronization(javax.transaction.Synchronization synchronizationListener)
The afterCompletion method is called after performing state transitions of persistent and transactional instances, following the data store commit or rollback operation.
Only one Synchronization instance can be registered with the Transaction. If the application requires more than one instance to receive synchronization callbacks, then the single application instance is responsible for managing them, and forwarding callbacks to them.
setSynchronization
in interface javax.jdo.Transaction
public UnitOfWork getUnitOfWork()
public void setUnitOfWork(UnitOfWork newUnitOfWork)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |