クラス MatchAlwaysTransactionAttributeSource

java.lang.ObjectSE
org.springframework.transaction.interceptor.MatchAlwaysTransactionAttributeSource
実装されたすべてのインターフェース:
SerializableSETransactionAttributeSource

public class MatchAlwaysTransactionAttributeSource extends ObjectSE implements TransactionAttributeSource, SerializableSE
TransactionAttributeSource の非常に単純な実装で、すべてのメソッドに常に同じ TransactionAttribute を返します。TransactionAttribute を指定できますが、それ以外の場合はデフォルトで PROPAGATION_REQUIRED になります。これは、トランザクションインターセプターによって処理されるすべてのメソッドで同じトランザクション属性を使用する場合に使用できます。
導入:
15.10.2003
作成者:
Colin Sampaleanu, Juergen Hoeller
関連事項:
  • コンストラクターの詳細

    • MatchAlwaysTransactionAttributeSource

      public MatchAlwaysTransactionAttributeSource()
  • メソッドの詳細

    • setTransactionAttribute

      public void setTransactionAttribute(TransactionAttribute transactionAttribute)
      "PROPAGATION_REQUIRED" などの文字列形式を使用して、トランザクション属性を指定できます。
      パラメーター:
      transactionAttribute - 使用する transactionAttribute の文字列形式。
      関連事項:
    • getTransactionAttribute

      @Nullable public TransactionAttribute getTransactionAttribute(MethodSE method, @Nullable ClassSE<?> targetClass)
      インターフェースからコピーされた説明: TransactionAttributeSource
      指定されたメソッドのトランザクション属性を返します。メソッドが非トランザクションの場合は null を返します。
      次で指定:
      インターフェース TransactionAttributeSourcegetTransactionAttribute 
      パラメーター:
      method - 内省する方法
      targetClass - ターゲットクラス (null にすることもできます。この場合、メソッドの宣言クラスを使用する必要があります。)
      戻り値:
      一致するトランザクション属性。見つからない場合は null 
    • equals

      public boolean equals(@Nullable ObjectSE other)
      オーバーライド:
      クラス ObjectSEequalsSE 
    • hashCode

      public int hashCode()
      オーバーライド:
      クラス ObjectSEhashCode 
    • toString

      public StringSE toString()
      オーバーライド:
      クラス ObjectSEtoString