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

NameMatchTransactionAttributeSource

open class NameMatchTransactionAttributeSource : TransactionAttributeSource, Serializable

Simple TransactionAttributeSource implementation that allows attributes to be matched by registered name.

Author
Juergen Hoeller

Since
21.08.2003

See Also
#isMatchMethodMapTransactionAttributeSource

Constructors

<init>

NameMatchTransactionAttributeSource()

Simple TransactionAttributeSource implementation that allows attributes to be matched by registered name.

Functions

addTransactionalMethod

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

Add an attribute for a transactional method.

Method names can be exact matches, or of the pattern "xxx*", "*xxx" or "*xxx*" for matching multiple methods.

equals

open fun equals(other: Any?): Boolean

getTransactionAttribute

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

hashCode

open fun hashCode(): Int

setNameMap

open fun setNameMap(nameMap: MutableMap<String, TransactionAttribute>): Unit

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

setProperties

open fun setProperties(transactionAttributes: Properties): Unit

Parses the given properties into a name/attribute map. Expects method names as keys and String attributes definitions as values, parsable into TransactionAttribute instances via TransactionAttributeEditor.

toString

open fun toString(): String