Class AbstractTransactionStatus

java.lang.Object
org.springframework.transaction.support.AbstractTransactionStatus
All Implemented Interfaces:
Flushable, SavepointManager, TransactionExecution, TransactionStatus
Direct Known Subclasses:
DefaultTransactionStatus, SimpleTransactionStatus

public abstract class AbstractTransactionStatus extends Object implements TransactionStatus
Abstract base implementation of the TransactionStatus interface.

Pre-implements the handling of local rollback-only and completed flags, and delegation to an underlying SavepointManager. Also offers the option of a holding a savepoint within the transaction.

Does not assume any specific internal transaction handling, such as an underlying transaction object, and no transaction synchronization mechanism.

Since:
1.2.3
Author:
Juergen Hoeller
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Create a savepoint and hold it for the transaction.
    This implementation delegates to a SavepointManager for the underlying transaction, if possible.
    void
    This implementation is empty, considering flush as a no-op.
    protected Object
    Get the savepoint for this transaction, if any.
    Return a SavepointManager for the underlying transaction, if possible.
    boolean
    Return whether this transaction internally carries a savepoint, that is, has been created as nested transaction based on a savepoint.
    boolean
    Return whether this transaction is completed, that is, whether it has already been committed or rolled back.
    boolean
    Template method for determining the global rollback-only flag of the underlying transaction, if any.
    boolean
    Determine the rollback-only flag via checking this TransactionStatus.
    boolean
    Determine the rollback-only flag via checking both the local rollback-only flag of this TransactionStatus and the global rollback-only flag of the underlying transaction, if any.
    void
    Release the savepoint that is held for the transaction.
    void
    This implementation delegates to a SavepointManager for the underlying transaction, if possible.
    void
    Roll back to the savepoint that is held for the transaction and release the savepoint right afterwards.
    void
    This implementation delegates to a SavepointManager for the underlying transaction, if possible.
    void
    Mark this transaction as completed, that is, committed or rolled back.
    void
    Set the transaction rollback-only.
    protected void
    setSavepoint(Object savepoint)
    Set a savepoint for this transaction.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.springframework.transaction.TransactionExecution

    isNewTransaction