Class JpaTransaction

java.lang.Object
de.xima.fc.persistence.impl.tx.JpaTransaction
All Implemented Interfaces:
IJpaTransaction, Closeable, AutoCloseable

public class JpaTransaction extends Object implements IJpaTransaction
Implementation of IJpaTransaction that manages a JPA transaction using an EntityManager. This class ensures that the transaction is properly started, committed, or rolled back as needed.

Note: This class is designed for internal use only. Plugins should not use this interface. This class may be moved to a different package in the future, so plugins should not depend on it.

Since:
8.5.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the JPA transaction context, committing the JPA transaction if set to do so.
    void
    Marks the transaction to be committed when the transaction context is closed.
    javax.persistence.EntityManager
    em()
    Returns the JPA EntityManager associated with this transaction context.
    forEntityManager(javax.persistence.EntityManager em)
     
    boolean
    Checks if the transaction is marked to be committed when it is closed.
    void
    Marks the transaction to be rolled back when the transaction context is closed.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait