|
|||||||||||
| 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 org.apache.commons.logging.Log |
logger
|
| Constructor Summary | |
MethodMapTransactionAttributeSource()
|
|
| Method Summary | |
void |
addTransactionalMethod(java.lang.Class clazz,
java.lang.String mappedName,
TransactionAttribute attr)
Add an attribute for a transactional method. |
void |
addTransactionalMethod(java.lang.reflect.Method method,
TransactionAttribute attr)
Add an attribute for a transactional method. |
void |
addTransactionalMethod(java.lang.String name,
TransactionAttribute attr)
Add an attribute for a transactional method. |
TransactionAttribute |
getTransactionAttribute(java.lang.reflect.Method method,
java.lang.Class targetClass)
Return the transaction attribute for this method. |
protected boolean |
isMatch(java.lang.String methodName,
java.lang.String mappedName)
Return if the given method name matches the mapped name. |
void |
setMethodMap(java.util.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 org.apache.commons.logging.Log logger
| Constructor Detail |
public MethodMapTransactionAttributeSource()
| Method Detail |
public void setMethodMap(java.util.Map methodMap)
public void addTransactionalMethod(java.lang.String name,
TransactionAttribute attr)
name - class and method name, separated by a dotattr - attribute associated with the method
public void addTransactionalMethod(java.lang.Class clazz,
java.lang.String mappedName,
TransactionAttribute attr)
clazz - target interface or classmappedName - mapped method nameattr - attribute associated with the method
public void addTransactionalMethod(java.lang.reflect.Method method,
TransactionAttribute attr)
method - the methodattr - attribute associated with the method
protected boolean isMatch(java.lang.String methodName,
java.lang.String mappedName)
methodName - the method name of the classmappedName - the name in the descriptor
public TransactionAttribute getTransactionAttribute(java.lang.reflect.Method method,
java.lang.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 | ||||||||||