|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
oracle.toplink.jdo.JDOTransaction
JDO wrapper for a TopLink unit of work.
Constructor Summary |
Method Summary |
Type | Method |
---|---|
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. |
oracle.toplink.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. |
Constructor Detail |
Method Detail |
public void begin()
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()
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.
public boolean getNontransactionalWrite()
public boolean getOptimistic()
public oracle.toplink.jdo.PersistenceManager getPersistenceManager()
public boolean getRetainValues()
public javax.transaction.Synchronization getSynchronization()
public boolean isActive()
public void rollback()
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.
nontransactionalRead
- the value of the nontransactionalRead propertypublic void setNontransactionalWrite(boolean arg1)
nontransactionalWrite
- the value of the nontransactionalRead propertypublic void setOptimistic(boolean arg1)
optimistic
- the value of the Optimistic flag.public void setRetainValues(boolean arg1)
retainValues
- the value of the retainValues propertypublic 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.
sync
- the Synchronization instance to be notified; null for nonepublic UnitOfWork getUnitOfWork()
public void setUnitOfWork(UnitOfWork newUnitOfWork)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |