public abstract class TransactionWrapperImpl extends Object
Modifier and Type | Field and Description |
---|---|
protected EntityManagerImpl |
entityManager |
protected RepeatableWriteUnitOfWork |
localUOW |
protected Object |
txnKey |
Constructor and Description |
---|
TransactionWrapperImpl(EntityManagerImpl entityManager) |
Modifier and Type | Method and Description |
---|---|
abstract Object |
checkForTransaction(boolean validateExistence)
INTERNAL:
This method will be used to check for a transaction and throws exception if none exists.
|
void |
clear()
INTERNAL:
Clears the transactional UnitOfWork
|
UnitOfWorkImpl |
getLocalUnitOfWork() |
abstract RepeatableWriteUnitOfWork |
getTransactionalUnitOfWork(Object transaction)
INTERNAL:
THis method is used to get the active UnitOfWork.
|
abstract void |
registerUnitOfWorkWithTxn(UnitOfWorkImpl uow) |
void |
setLocalUnitOfWork(RepeatableWriteUnitOfWork uow) |
abstract void |
setRollbackOnlyInternal()
Mark the current transaction so that the only possible
outcome of the transaction is for the transaction to be
rolled back.
|
abstract boolean |
shouldFlushBeforeQuery(UnitOfWorkImpl uow)
This method will be called when a query is executed.
|
protected EntityManagerImpl entityManager
protected RepeatableWriteUnitOfWork localUOW
protected Object txnKey
public TransactionWrapperImpl(EntityManagerImpl entityManager)
public abstract Object checkForTransaction(boolean validateExistence)
public void clear()
public abstract RepeatableWriteUnitOfWork getTransactionalUnitOfWork(Object transaction)
transaction
- public abstract void registerUnitOfWorkWithTxn(UnitOfWorkImpl uow)
public UnitOfWorkImpl getLocalUnitOfWork()
public void setLocalUnitOfWork(RepeatableWriteUnitOfWork uow)
public abstract void setRollbackOnlyInternal()
public abstract boolean shouldFlushBeforeQuery(UnitOfWorkImpl uow)
Copyright © 2022. All rights reserved.