Class TransactionWrapperImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected EntityManagerImpl entityManager  
      protected org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork localUOW  
      protected java.lang.Object txnKey  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.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
      org.eclipse.persistence.internal.sessions.UnitOfWorkImpl getLocalUnitOfWork()  
      abstract boolean isJoinedToTransaction​(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)  
      abstract void registerIfRequired​(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)  
      void setLocalUnitOfWork​(org.eclipse.persistence.internal.sessions.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • localUOW

        protected org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork localUOW
      • txnKey

        protected java.lang.Object txnKey
    • Constructor Detail

      • TransactionWrapperImpl

        public TransactionWrapperImpl​(EntityManagerImpl entityManager)
    • Method Detail

      • checkForTransaction

        public abstract java.lang.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​(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
      • isJoinedToTransaction

        public abstract boolean isJoinedToTransaction​(org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
      • getLocalUnitOfWork

        public org.eclipse.persistence.internal.sessions.UnitOfWorkImpl getLocalUnitOfWork()
      • setLocalUnitOfWork

        public void setLocalUnitOfWork​(org.eclipse.persistence.internal.sessions.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