stomp.jdo
Class TransactionWrapper
java.lang.Object
|
+--stomp.jdo.TransactionWrapper
- All Implemented Interfaces:
- javax.jdo.Transaction
- Direct Known Subclasses:
- EnhancedTransaction
- public class TransactionWrapper
- extends java.lang.Object
- implements javax.jdo.Transaction
wraps a JDO Transaction object, preventing any developer attempts
to begin or commit the transaction. Alternatively named methods
which accomplish this effect are provided, to allow for JDOFactory
transaction management which is transparent to the developer.
works in conjunction with the HCMPersistenceMananger.
- Author:
- Eric Lindauer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransactionWrapper
public TransactionWrapper(PMWrapper pm)
addDeletedId
public void addDeletedId(ObjectId pcId)
- adds an id to the list of ids that have been altered in this transaction.
begin
public void begin()
- Specified by:
begin in interface javax.jdo.Transaction
reallyBegin
public void reallyBegin()
- For transparent transactional control only.
commit
public void commit()
- Specified by:
commit in interface javax.jdo.Transaction
reallyCommit
public boolean reallyCommit()
- For transparent transactional control only.
fixState
protected void fixState(java.lang.Object object)
- called when the PM for a transactional object is closed. This gives the Transaction
the opportunity to save this object and make it usable. This particular
implementation does nothing, so references to transactional objects must be
discarded after the transaction is closed.
getNontransactionalRead
public boolean getNontransactionalRead()
- Specified by:
getNontransactionalRead in interface javax.jdo.Transaction
getNontransactionalWrite
public boolean getNontransactionalWrite()
- Specified by:
getNontransactionalWrite in interface javax.jdo.Transaction
getOptimistic
public boolean getOptimistic()
- Specified by:
getOptimistic in interface javax.jdo.Transaction
getPersistenceManager
public javax.jdo.PersistenceManager getPersistenceManager()
- Specified by:
getPersistenceManager in interface javax.jdo.Transaction
getRetainValues
public boolean getRetainValues()
- Specified by:
getRetainValues in interface javax.jdo.Transaction
getSynchronization
public javax.transaction.Synchronization getSynchronization()
- Specified by:
getSynchronization in interface javax.jdo.Transaction
isActive
public boolean isActive()
- Specified by:
isActive in interface javax.jdo.Transaction
rollback
public void rollback()
- rollback the current transaction. Since this is similar to a commit in that it
ends the current transaction, also removes this transaction and its PM from
the JDOFactory.singleton ().
- Specified by:
rollback in interface javax.jdo.Transaction
setNontransactionalRead
public void setNontransactionalRead(boolean nontransactionalRead)
- Specified by:
setNontransactionalRead in interface javax.jdo.Transaction
setNontransactionalWrite
public void setNontransactionalWrite(boolean nontransactionalWrite)
- Specified by:
setNontransactionalWrite in interface javax.jdo.Transaction
setOptimistic
public void setOptimistic(boolean optimistic)
- Specified by:
setOptimistic in interface javax.jdo.Transaction
setRetainValues
public void setRetainValues(boolean retainValues)
- Specified by:
setRetainValues in interface javax.jdo.Transaction
setSynchronization
public void setSynchronization(javax.transaction.Synchronization sync)
- Specified by:
setSynchronization in interface javax.jdo.Transaction
setRestoreValues
public void setRestoreValues(boolean restore)
- Specified by:
setRestoreValues in interface javax.jdo.Transaction
getRestoreValues
public boolean getRestoreValues()
- Specified by:
getRestoreValues in interface javax.jdo.Transaction