クラス EntityManagerHolder
java.lang.ObjectSE
org.springframework.transaction.support.ResourceHolderSupport
org.springframework.orm.jpa.EntityManagerHolder
- 実装されているすべてのインターフェース:
ResourceHolder
- 既知の直属サブクラス
SessionHolder
JPA
EntityManager をラップするリソースホルダー。JpaTransactionManager は、指定された EntityManagerFactory に対して、このクラスのインスタンスをスレッドにバインドします。メモ: これは SPI クラスであり、アプリケーションでの使用は意図されていません。
- 導入:
- 2.0
- 作成者:
- Juergen Hoeller
- 関連事項:
フィールドのサマリー
フィールドコンストラクターの概要
コンストラクター方法の概要
修飾子と型メソッド説明voidclear()このリソースホルダーのトランザクション状態をクリアします。protected voidcloseAll()jakarta.persistence.EntityManagerprotected @Nullable SavepointManagerprotected booleanprotected voidsetSavepointManager(@Nullable SavepointManager savepointManager) protected voidsetTransactionActive(boolean transactionActive) クラス ResourceHolderSupport から継承されたメソッド
getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, isVoid, released, requested, reset, resetRollbackOnly, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds, unbound
フィールドの詳細
entityManager
コンストラクターの詳細
EntityManagerHolder
メソッドの詳細
getEntityManager
public jakarta.persistence.EntityManager getEntityManager()setTransactionActive
protected void setTransactionActive(boolean transactionActive) isTransactionActive
protected boolean isTransactionActive()setSavepointManager
getSavepointManager
clear
public void clear()クラスからコピーされた説明:ResourceHolderSupportこのリソースホルダーのトランザクション状態をクリアします。- オーバーライド:
- クラス
ResourceHolderSupportのclear
closeAll
protected void closeAll()