|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.springframework.transaction.interceptor.MethodMapTransactionAttributeSource
Simple implementation of TransactionAttributeSource that allows attributes to be stored per method in a map.
isMatch(java.lang.String, java.lang.String)| Field Summary | |
protected Log |
logger
|
| Constructor Summary | |
MethodMapTransactionAttributeSource()
|
|
| Method Summary | |
void |
addTransactionalMethod(Class clazz,
String mappedName,
TransactionAttribute attr)
Add an attribute for a transactional method. |
void |
addTransactionalMethod(Method method,
TransactionAttribute attr)
Add an attribute for a transactional method. |
void |
addTransactionalMethod(String name,
TransactionAttribute attr)
Add an attribute for a transactional method. |
TransactionAttribute |
getTransactionAttribute(Method method,
Class targetClass)
Return the transaction attribute for this method. |
protected boolean |
isMatch(String methodName,
String mappedName)
Return if the given method name matches the mapped name. |
void |
setMethodMap(Map methodMap)
Set a name/attribute map, consisting of "FQCN.method" method names (e.g. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final Log logger
| Constructor Detail |
public MethodMapTransactionAttributeSource()
| Method Detail |
public void setMethodMap(Map methodMap)
public void addTransactionalMethod(String name,
TransactionAttribute attr)
name - class and method name, separated by a dotattr - attribute associated with the method
public void addTransactionalMethod(Class clazz,
String mappedName,
TransactionAttribute attr)
clazz - target interface or classmappedName - mapped method nameattr - attribute associated with the method
public void addTransactionalMethod(Method method,
TransactionAttribute attr)
method - the methodattr - attribute associated with the method
protected boolean isMatch(String methodName,
String mappedName)
methodName - the method name of the classmappedName - the name in the descriptor
public TransactionAttribute getTransactionAttribute(Method method,
Class targetClass)
TransactionAttributeSource
getTransactionAttribute in interface TransactionAttributeSourcemethod - methodtargetClass - target class. May be null, in which case the declaring
class of the method must be used.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||