java.lang.Object | |
↳ | org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource |
Simple TransactionAttributeSource
implementation that
allows attributes to be matched by registered name.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
logger | Logger available to subclasses. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add an attribute for a transactional method.
| |||||||||||
Return the transaction attribute for this method.
| |||||||||||
Set a name/attribute map, consisting of method names
(e.g.
| |||||||||||
Parses the given properties into a name/attribute map.
| |||||||||||
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return if the given method name matches the mapped name.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.transaction.interceptor.TransactionAttributeSource
|
Logger available to subclasses.
Static for optimal serialization.
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.
methodName | the name of the method |
---|---|
attr | attribute associated with the method |
Return the transaction attribute for this method. Return null if the method is non-transactional.
method | method |
---|---|
targetClass | target class. May be null , in which
case the declaring class of the method must be used. |
null
if none found
Set a name/attribute map, consisting of method names (e.g. "myMethod") and TransactionAttribute instances (or Strings to be converted to TransactionAttribute instances).
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.
Return if the given method name matches the mapped name.
The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. Can be overridden in subclasses.
methodName | the method name of the class |
---|---|
mappedName | the name in the descriptor |