public class NameMatchTransactionAttributeSource extends ObjectSE implements TransactionAttributeSource, SerializableSE
TransactionAttributeSource 実装。isMatch(java.lang.String, java.lang.String), MethodMapTransactionAttributeSource, 連載形式 | コンストラクターと説明 |
|---|
NameMatchTransactionAttributeSource() |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | addTransactionalMethod(StringSE methodName, TransactionAttribute attr) トランザクションメソッドの属性を追加します。 |
boolean | equals(ObjectSE other) |
TransactionAttribute | getTransactionAttribute(MethodSE method, ClassSE<?> targetClass) 指定されたメソッドのトランザクション属性を返します。メソッドが非トランザクションの場合は null を返します。 |
int | hashCode() |
protected boolean | isMatch(StringSE methodName, StringSE mappedName) 指定されたメソッド名がマッピング名と一致する場合に戻ります。 |
void | setNameMap(MapSE<StringSE, TransactionAttribute> nameMap) メソッド名で構成される名前 / 属性マップを設定します(例: |
void | setProperties(PropertiesSE transactionAttributes) 指定されたプロパティを名前 / 属性マップに解析します。 |
StringSE | toString() |
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSEprotected static final Log logger
最適な直列化のための静的。
public void setNameMap(MapSE<StringSE,TransactionAttribute> nameMap)
public void setProperties(PropertiesSE transactionAttributes)
public void addTransactionalMethod(StringSE methodName, TransactionAttribute attr)
メソッド名は完全一致にすることも、複数のメソッドに一致させる場合は "xxx*"、"*xxx"、"*xxx*" のパターンにすることもできます。
methodName - メソッドの名前 attr - メソッドに関連付けられた属性 @Nullable public TransactionAttribute getTransactionAttribute(MethodSE method, @Nullable ClassSE<?> targetClass)
TransactionAttributeSourcenull を返します。TransactionAttributeSource の getTransactionAttribute method - イントロスペクトする方法 targetClass - ターゲットクラス (null の場合があります。この場合、メソッドの宣言クラスを使用する必要があります)null protected boolean isMatch(StringSE methodName, StringSE mappedName)
デフォルトの実装では、"xxx*"、"*xxx"、"*xxx*" の一致、直接の同等性をチェックします。サブクラスでオーバーライドできます。
methodName - クラスのメソッド名 mappedName - 記述子内の名前 PatternMatchUtils.simpleMatch(String, String)public int hashCode()
ObjectSE の hashCodeSE public StringSE toString()
ObjectSE の toStringSE