Class SimpleTransactionStatus
java.lang.Object
org.springframework.transaction.support.AbstractTransactionStatus
org.springframework.transaction.support.SimpleTransactionStatus
- All Implemented Interfaces:
 Flushable,SavepointManager,TransactionExecution,TransactionStatus
A simple 
TransactionStatus
 implementation. Derives from AbstractTransactionStatus and
 adds an explicit "newTransaction" flag.
 This class is not used by any of Spring's pre-built
 PlatformTransactionManager
 implementations. It is mainly provided as a start for custom transaction
 manager implementations and as a static mock for testing transactional
 code (either as part of a mock PlatformTransactionManager or
 as argument passed into a TransactionCallback to be tested).
- Since:
 - 1.2.3
 - Author:
 - Juergen Hoeller
 - See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionCreate a newSimpleTransactionStatusinstance, indicating a new transaction.SimpleTransactionStatus(boolean newTransaction) Create a newSimpleTransactionStatusinstance. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn whether the present transaction is new; otherwise participating in an existing transaction, or potentially not running in an actual transaction in the first place.Methods inherited from class org.springframework.transaction.support.AbstractTransactionStatus
createAndHoldSavepoint, createSavepoint, flush, getSavepoint, getSavepointManager, hasSavepoint, isCompleted, isGlobalRollbackOnly, isLocalRollbackOnly, isRollbackOnly, releaseHeldSavepoint, releaseSavepoint, rollbackToHeldSavepoint, rollbackToSavepoint, setCompleted, setRollbackOnly, setSavepoint 
- 
Constructor Details
- 
SimpleTransactionStatus
public SimpleTransactionStatus()Create a newSimpleTransactionStatusinstance, indicating a new transaction. - 
SimpleTransactionStatus
public SimpleTransactionStatus(boolean newTransaction) Create a newSimpleTransactionStatusinstance.- Parameters:
 newTransaction- whether to indicate a new transaction
 
 - 
 - 
Method Details
- 
isNewTransaction
public boolean isNewTransaction()Description copied from interface:TransactionExecutionReturn whether the present transaction is new; otherwise participating in an existing transaction, or potentially not running in an actual transaction in the first place. 
 -