public class

MatchAlwaysTransactionAttributeSource

extends Object
implements Serializable TransactionAttributeSource
java.lang.Object
   ↳ org.springframework.transaction.interceptor.MatchAlwaysTransactionAttributeSource

Class Overview

Very simple implementation of TransactionAttributeSource which will always return the same TransactionAttribute for all methods fed to it. The TransactionAttribute may be specified, but will otherwise default to PROPAGATION_REQUIRED. This may be used in the cases where you want to use the same transaction attribute with all methods being handled by a transaction interceptor.

Summary

Public Constructors
MatchAlwaysTransactionAttributeSource()
Public Methods
boolean equals(Object other)
TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass)
Return the transaction attribute for this method.
int hashCode()
void setTransactionAttribute(TransactionAttribute transactionAttribute)
Allows a transaction attribute to be specified, using the String form, for example, "PROPAGATION_REQUIRED".
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.transaction.interceptor.TransactionAttributeSource

Public Constructors

public MatchAlwaysTransactionAttributeSource ()

Public Methods

public boolean equals (Object other)

public TransactionAttribute getTransactionAttribute (Method method, Class<?> targetClass)

Return the transaction attribute for this method. Return null if the method is non-transactional.

Parameters
method method
targetClass target class. May be null, in which case the declaring class of the method must be used.
Returns
  • TransactionAttribute the matching transaction attribute, or null if none found

public int hashCode ()

public void setTransactionAttribute (TransactionAttribute transactionAttribute)

Allows a transaction attribute to be specified, using the String form, for example, "PROPAGATION_REQUIRED".

Parameters
transactionAttribute The String form of the transactionAttribute to use.

public String toString ()