类 EntityManagerHolder
- java.lang.Object
- org.springframework.transaction.support.ResourceHolderSupport
- org.springframework.orm.jpa.EntityManagerHolder
- 所有已实现的接口:
ResourceHolder
public class EntityManagerHolder extends ResourceHolderSupport
Holder wrapping a JPA EntityManager. JpaTransactionManager binds instances of this class to the thread, for a given EntityManagerFactory.Note: This is an SPI class, not intended to be used by applications.
- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller
- 另请参阅:
JpaTransactionManager
,EntityManagerFactoryUtils
构造器概要
构造器 构造器 说明 EntityManagerHolder(EntityManager entityManager)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
clear()
Clear the transactional state of this resource holder.EntityManager
getEntityManager()
protected SavepointManager
getSavepointManager()
protected boolean
isTransactionActive()
protected void
setSavepointManager(SavepointManager savepointManager)
protected void
setTransactionActive(boolean transactionActive)
从类继承的方法 org.springframework.transaction.support.ResourceHolderSupport
getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, isVoid, released, requested, reset, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds, unbound
构造器详细资料
EntityManagerHolder
public EntityManagerHolder(EntityManager entityManager)
方法详细资料
getEntityManager
public EntityManager getEntityManager()
setTransactionActive
protected void setTransactionActive(boolean transactionActive)
isTransactionActive
protected boolean isTransactionActive()
setSavepointManager
protected void setSavepointManager(SavepointManager savepointManager)
getSavepointManager
protected SavepointManager getSavepointManager()
clear
public void clear()
从类复制的说明:ResourceHolderSupport
Clear the transactional state of this resource holder.- 覆盖:
clear
在类中ResourceHolderSupport