|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.transaction.interceptor.NameMatchTransactionAttributeSource
Simple implementation of TransactionAttributeSource that allows attributes to be matched by registered name.
isMatch(java.lang.String, java.lang.String)
Field Summary | |
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
NameMatchTransactionAttributeSource()
|
Method Summary | |
void |
addTransactionalMethod(java.lang.String methodName,
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 |
setNameMap(java.util.Map nameMap)
Set a name/attribute map, consisting of method names (e.g. |
void |
setProperties(java.util.Properties transactionAttributes)
Parses the given properties into a name/attribute map. |
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 NameMatchTransactionAttributeSource()
Method Detail |
public void setNameMap(java.util.Map nameMap)
TransactionAttribute
public void setProperties(java.util.Properties transactionAttributes)
setNameMap(java.util.Map)
,
TransactionAttributeEditor
public void addTransactionalMethod(java.lang.String methodName, TransactionAttribute attr)
methodName
- the name of the methodattr
- attribute associated with the methodpublic TransactionAttribute getTransactionAttribute(java.lang.reflect.Method method, java.lang.Class targetClass)
TransactionAttributeSource
getTransactionAttribute
in interface TransactionAttributeSource
method
- methodtargetClass
- target class. May be null, in which case the declaring
class of the method must be used.
protected boolean isMatch(java.lang.String methodName, java.lang.String mappedName)
methodName
- the method name of the classmappedName
- the name in the descriptor
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |