Class TransactionWrapperImpl
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.transaction.TransactionWrapperImpl
-
- Direct Known Subclasses:
EntityTransactionWrapper,JTATransactionWrapper
public abstract class TransactionWrapperImpl extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected EntityManagerImplentityManagerprotected RepeatableWriteUnitOfWorklocalUOWprotected ObjecttxnKey
-
Constructor Summary
Constructors Constructor Description TransactionWrapperImpl(EntityManagerImpl entityManager)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ObjectcheckForTransaction(boolean validateExistence)INTERNAL: This method will be used to check for a transaction and throws exception if none exists.voidclear()INTERNAL: Clears the transactional UnitOfWorkUnitOfWorkImplgetLocalUnitOfWork()abstract booleanisJoinedToTransaction(UnitOfWorkImpl uow)abstract voidregisterIfRequired(UnitOfWorkImpl uow)voidsetLocalUnitOfWork(RepeatableWriteUnitOfWork uow)abstract voidsetRollbackOnlyInternal()Mark the current transaction so that the only possible outcome of the transaction is for the transaction to be rolled back.
-
-
-
Field Detail
-
entityManager
protected EntityManagerImpl entityManager
-
localUOW
protected RepeatableWriteUnitOfWork localUOW
-
txnKey
protected Object txnKey
-
-
Constructor Detail
-
TransactionWrapperImpl
public TransactionWrapperImpl(EntityManagerImpl entityManager)
-
-
Method Detail
-
checkForTransaction
public abstract Object checkForTransaction(boolean validateExistence)
INTERNAL: This method will be used to check for a transaction and throws exception if none exists. If this method returns without exception then a transaction exists. This method must be called before accessing the localUOW.
-
clear
public void clear()
INTERNAL: Clears the transactional UnitOfWork
-
registerIfRequired
public abstract void registerIfRequired(UnitOfWorkImpl uow)
-
isJoinedToTransaction
public abstract boolean isJoinedToTransaction(UnitOfWorkImpl uow)
-
getLocalUnitOfWork
public UnitOfWorkImpl getLocalUnitOfWork()
-
setLocalUnitOfWork
public void setLocalUnitOfWork(RepeatableWriteUnitOfWork uow)
-
setRollbackOnlyInternal
public abstract void setRollbackOnlyInternal()
Mark the current transaction so that the only possible outcome of the transaction is for the transaction to be rolled back. This is an internal method and if the txn is not active will do nothing
-
-