public class NameMatchTransactionAttributeSource extends ObjectSE implements TransactionAttributeSource, EmbeddedValueResolverAware, InitializingBean, SerializableSE
TransactionAttributeSource 実装。isMatch(java.lang.String, java.lang.String), MethodMapTransactionAttributeSource, 連載形式 | コンストラクターと説明 |
|---|
NameMatchTransactionAttributeSource() |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | addTransactionalMethod(StringSE methodName, TransactionAttribute attr) トランザクションメソッドの属性を追加します。 |
void | afterPropertiesSet() |
boolean | equals(ObjectSE other) |
TransactionAttribute | getTransactionAttribute(MethodSE method, ClassSE<?> targetClass) 指定されたメソッドのトランザクション属性を返します。メソッドが非トランザクションの場合は null を返します。 |
int | hashCode() |
protected boolean | isMatch(StringSE methodName, StringSE mappedName) 指定されたメソッド名がマップされた名前と一致するかどうかを判別します。 |
void | setEmbeddedValueResolver(StringValueResolver resolver)StringValueResolver を設定して、埋め込まれた定義値の解決に使用します。 |
void | setNameMap(MapSE<StringSE, TransactionAttribute> nameMap) メソッド名で構成される名前 / 属性マップを設定します(例: |
void | setProperties(PropertiesSE transactionAttributes) 指定されたプロパティを名前 / 属性マップに解析します。 |
StringSE | toString() |
cloneSE, finalizeSE, getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSEisCandidateClassprotected static final Log logger
最適な直列化のための静的。
public void setNameMap(MapSE<StringSE,TransactionAttribute> nameMap)
TransactionAttribute インスタンスで構成される名前 / 属性マップを設定します。public void setProperties(PropertiesSE transactionAttributes)
メソッド名をキーとして、文字列属性の定義を値として想定し、TransactionAttributeEditor を介して TransactionAttribute インスタンスに解析可能です。
public void addTransactionalMethod(StringSE methodName, TransactionAttribute attr)
メソッド名は完全一致にすることも、複数のメソッドに一致させる場合はパターン "xxx*"、"*xxx"、"*xxx*" にすることもできます。
methodName - メソッドの名前 attr - メソッドに関連付けられた属性 public void setEmbeddedValueResolver(StringValueResolver resolver)
EmbeddedValueResolverAwareEmbeddedValueResolverAware 内の setEmbeddedValueResolver public void afterPropertiesSet()
InitializingBeanBeanFactoryAware、ApplicationContextAware などを満たした後、包含 BeanFactory によって呼び出されます。このメソッドにより、Bean インスタンスは、すべての Bean プロパティが設定されたときに、その全体的な構成の検証と最終的な初期化を実行できます。
InitializingBean 内の afterPropertiesSet @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 - 記述子内の名前 true PatternMatchUtils.simpleMatch(String, String)public int hashCode()
ObjectSE の hashCodeSE public StringSE toString()
ObjectSE の toStringSE