spring-framework / org.springframework.transaction.interceptor / MethodMapTransactionAttributeSource

MethodMapTransactionAttributeSource

open class MethodMapTransactionAttributeSource : TransactionAttributeSource, BeanClassLoaderAware, InitializingBean

Simple TransactionAttributeSource implementation that allows attributes to be stored per method in a Map.

Author
Rod Johnson

Author
Juergen Hoeller

Since
24.04.2003

See Also
#isMatchNameMatchTransactionAttributeSource

Constructors

<init>

MethodMapTransactionAttributeSource()

Simple TransactionAttributeSource implementation that allows attributes to be stored per method in a Map.

Functions

addTransactionalMethod

open fun addTransactionalMethod(name: String, attr: TransactionAttribute): Unit

Add an attribute for a transactional method.

Method names can end or start with "*" for matching multiple methods.

open fun addTransactionalMethod(clazz: Class<*>, mappedName: String, attr: TransactionAttribute): Unit

Add an attribute for a transactional method. Method names can end or start with "*" for matching multiple methods.

open fun addTransactionalMethod(method: Method, attr: TransactionAttribute): Unit

Add an attribute for a transactional method.

afterPropertiesSet

open fun afterPropertiesSet(): Unit

Eagerly initializes the specified "methodMap", if any.

equals

open fun equals(other: Any?): Boolean

getTransactionAttribute

open fun getTransactionAttribute(method: Method, targetClass: Class<*>): TransactionAttribute

hashCode

open fun hashCode(): Int

setBeanClassLoader

open fun setBeanClassLoader(beanClassLoader: ClassLoader): Unit

setMethodMap

open fun setMethodMap(methodMap: MutableMap<String, TransactionAttribute>): Unit

Set a name/attribute map, consisting of "FQCN.method" method names (e.g. "com.mycompany.mycode.MyClass.myMethod") and TransactionAttribute instances (or Strings to be converted to TransactionAttribute instances).

Intended for configuration via setter injection, typically within a Spring bean factory. Relies on #afterPropertiesSet() being called afterwards.

toString

open fun toString(): String