Interface ITransaction

  • All Superinterfaces:
    AutoCloseable, Closeable

    @Deprecated
    public interface ITransaction
    extends Closeable
    Deprecated.
    Needs to sit in a JPMS module for proper use.
    Common interface representing a transaction. This interface provides methods to manage the transaction lifecycle, including committing and rolling back transactions.

    Note: Transactions need be set to be committed on close explicitly by calling commit(). Otherwise, the transaction will be rolled back automatically when the context is closed.

    This interface extends Closeable to allow for automatic resource management, ensuring that the transaction is properly closed and resources are released.

    Note: This interface is intended for internal use only and should not be implemented by plugins. It may be moved to a different package in the future, so plugins should not depend on it.

    Since:
    8.5.0
    Author:
    Norman Lorenz
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void close()
      Deprecated.
      Closes the transaction, committing the JPA transaction if set to do so.
      void commit()
      Deprecated.
      Marks the transaction to be committed when the transaction context is closed.
      boolean isCommit()
      Deprecated.
      Checks if the transaction is marked to be committed when it is closed.
      void rollback()
      Deprecated.
      Marks the transaction to be rolled back when the transaction context is closed.
    • Method Detail

      • commit

        void commit()
        Deprecated.
        Marks the transaction to be committed when the transaction context is closed.
        See Also:
        close()
      • isCommit

        boolean isCommit()
        Deprecated.
        Checks if the transaction is marked to be committed when it is closed.
        Returns:
        true if the transaction is set to be committed, false otherwise
        See Also:
        commit(), rollback()
      • rollback

        void rollback()
        Deprecated.
        Marks the transaction to be rolled back when the transaction context is closed.
        See Also:
        close()