com.interface21.transaction.support
Class DefaultTransactionDefinition

java.lang.Object
  |
  +--com.interface21.transaction.support.DefaultTransactionDefinition
All Implemented Interfaces:
TransactionDefinition
Direct Known Subclasses:
DefaultTransactionAttribute, TransactionTemplate

public class DefaultTransactionDefinition
extends java.lang.Object
implements TransactionDefinition

Default implementation of the TransactionDefinition interface, offering bean-style configuration and sensible default values (PROPAGATION_REQUIRED, ISOLATION_DEFAULT, TIMEOUT_DEFAULT). Base class for both TransactionTemplate and DefaultTransactionAttribute.

Since:
08.05.2003
Author:
Juergen Hoeller
See Also:
TransactionTemplate, DefaultTransactionAttribute

Fields inherited from interface com.interface21.transaction.TransactionDefinition
ISOLATION_CONSTANT_PREFIX, ISOLATION_DEFAULT, ISOLATION_READ_COMMITTED, ISOLATION_READ_UNCOMMITTED, ISOLATION_REPEATABLE_READ, ISOLATION_SERIALIZABLE, PROPAGATION_CONSTANT_PREFIX, PROPAGATION_MANDATORY, PROPAGATION_REQUIRED, PROPAGATION_SUPPORTS, TIMEOUT_DEFAULT
 
Constructor Summary
DefaultTransactionDefinition()
           
DefaultTransactionDefinition(int propagationBehavior)
           
DefaultTransactionDefinition(int propagationBehavior, int isolationLevel)
           
 
Method Summary
 int getIsolationLevel()
          Return the isolation level.
 int getPropagationBehavior()
          Return the propagation behavior.
 int getTimeout()
          Return the transaction timeout.
 void setIsolationLevel(int isolationLevel)
           
 void setPropagationBehavior(int propagationBehavior)
           
 void setTimeout(int timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTransactionDefinition

public DefaultTransactionDefinition()

DefaultTransactionDefinition

public DefaultTransactionDefinition(int propagationBehavior)

DefaultTransactionDefinition

public DefaultTransactionDefinition(int propagationBehavior,
                                    int isolationLevel)
Method Detail

getPropagationBehavior

public int getPropagationBehavior()
Description copied from interface: TransactionDefinition
Return the propagation behavior. Must return of the constants in PlatformTransactionManager.
Specified by:
getPropagationBehavior in interface TransactionDefinition
Following copied from interface: com.interface21.transaction.TransactionDefinition
See Also:
PlatformTransactionManager

setPropagationBehavior

public void setPropagationBehavior(int propagationBehavior)

getIsolationLevel

public int getIsolationLevel()
Description copied from interface: TransactionDefinition
Return the isolation level. Must return of the constants in PlatformTransactionManager.
Specified by:
getIsolationLevel in interface TransactionDefinition
Following copied from interface: com.interface21.transaction.TransactionDefinition
See Also:
PlatformTransactionManager

setIsolationLevel

public void setIsolationLevel(int isolationLevel)

getTimeout

public int getTimeout()
Description copied from interface: TransactionDefinition
Return the transaction timeout. Must return a number of seconds, or TIMEOUT_DEFAULT.
Specified by:
getTimeout in interface TransactionDefinition
Following copied from interface: com.interface21.transaction.TransactionDefinition
See Also:
TransactionDefinition.TIMEOUT_DEFAULT

setTimeout

public void setTimeout(int timeout)


Rod Johnson and Spring contributors 2001-2003.