クラス CompositeTransactionAttributeSource

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

public class CompositeTransactionAttributeSource extends ObjectSE implements TransactionAttributeSource, SerializableSE
TransactionAttributeSource インスタンスの特定の配列を反復処理する複合 TransactionAttributeSource 実装。
導入:
2.0
作成者:
Juergen Hoeller
関連事項:
  • コンストラクターの詳細

    • CompositeTransactionAttributeSource

      public CompositeTransactionAttributeSource(TransactionAttributeSource... transactionAttributeSources)
      指定されたソースの新しい CompositeTransactionAttributeSource を作成します。
      パラメーター:
      transactionAttributeSources - 組み合わせる TransactionAttributeSource インスタンス
  • メソッドの詳細

    • getTransactionAttributeSources

      public final TransactionAttributeSource[] getTransactionAttributeSources()
      この CompositeTransactionAttributeSource が結合する TransactionAttributeSource インスタンスを返します。
    • isCandidateClass

      public boolean isCandidateClass(ClassSE<?> targetClass)
      インターフェースからコピーされた説明: TransactionAttributeSource
      指定されたクラスが、この TransactionAttributeSource のメタデータ形式のトランザクション属性の候補であるかどうかを判別します。

      このメソッドが false を返す場合、指定されたクラスのメソッドは TransactionAttributeSource.getTransactionAttribute(java.lang.reflect.Method, java.lang.Class<?>) イントロスペクションのために走査されません。false を返すことは、影響を受けないクラスの最適化です。一方、true は、クラスが特定のクラスの各メソッドに対して個別に完全に内省する必要があることを意味します。

      次で指定:
      インターフェース TransactionAttributeSourceisCandidateClass 
      パラメーター:
      targetClass - 内省するクラス
      戻り値:
      クラスまたはメソッドレベルでトランザクション属性を持たないことがクラスに知られている場合は false。それ以外の場合は true。デフォルトの実装は true を返し、通常のイントロスペクションにつながります。
    • getTransactionAttribute

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