|
|||||||||||
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)
,
MethodMapTransactionAttributeSource
,
Serialized FormField Summary | |
protected static Log |
logger
Static for optimal serialization |
Constructor Summary | |
NameMatchTransactionAttributeSource()
|
Method Summary | |
void |
addTransactionalMethod(String methodName,
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 |
setNameMap(Map nameMap)
Set a name/attribute map, consisting of method names (e.g. |
void |
setProperties(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 static final Log logger
Constructor Detail |
public NameMatchTransactionAttributeSource()
Method Detail |
public void setNameMap(Map nameMap)
TransactionAttribute
,
TransactionAttributeEditor
public void setProperties(Properties transactionAttributes)
setNameMap(java.util.Map)
,
TransactionAttributeEditor
public void addTransactionalMethod(String methodName, TransactionAttribute attr)
methodName
- the name of the methodattr
- attribute associated with the methodpublic TransactionAttribute getTransactionAttribute(Method method, 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(String methodName, 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 |