接口的使用
org.springframework.dao.support.PersistenceExceptionTranslator
使用PersistenceExceptionTranslator的程序包 程序包 说明 org.springframework.dao.annotation Annotation support for DAOs.org.springframework.dao.support Support classes for DAO implementations, providing miscellaneous utility methods.org.springframework.orm.hibernate5 Package providing integration of Hibernate 5.x with Spring concepts.org.springframework.orm.jpa Package providing integration of JPA (Java Persistence API) with Spring concepts.org.springframework.orm.jpa.vendor Support classes for adapting to specific JPA vendors.org.springframework.dao.annotation中PersistenceExceptionTranslator的使用
参数类型为PersistenceExceptionTranslator的org.springframework.dao.annotation中的构造器 构造器 说明 PersistenceExceptionTranslationAdvisor(PersistenceExceptionTranslator persistenceExceptionTranslator, Class<? extends Annotation> repositoryAnnotationType)
Create a new PersistenceExceptionTranslationAdvisor.org.springframework.dao.support中PersistenceExceptionTranslator的使用
实现PersistenceExceptionTranslator的org.springframework.dao.support中的类 修饰符和类型 类 说明 class
ChainedPersistenceExceptionTranslator
Implementation ofPersistenceExceptionTranslator
that supports chaining, allowing the addition of PersistenceExceptionTranslator instances in order.返回PersistenceExceptionTranslator的org.springframework.dao.support中的方法 修饰符和类型 方法 说明 protected PersistenceExceptionTranslator
PersistenceExceptionTranslationInterceptor. detectPersistenceExceptionTranslators(ListableBeanFactory bf)
Detect all PersistenceExceptionTranslators in the given BeanFactory.PersistenceExceptionTranslator[]
ChainedPersistenceExceptionTranslator. getDelegates()
Return all registered PersistenceExceptionTranslator delegates (as array).参数类型为PersistenceExceptionTranslator的org.springframework.dao.support中的方法 修饰符和类型 方法 说明 void
ChainedPersistenceExceptionTranslator. addDelegate(PersistenceExceptionTranslator pet)
Add a PersistenceExceptionTranslator to the chained delegate list.void
PersistenceExceptionTranslationInterceptor. setPersistenceExceptionTranslator(PersistenceExceptionTranslator pet)
Specify the PersistenceExceptionTranslator to use.static RuntimeException
DataAccessUtils. translateIfNecessary(RuntimeException rawException, PersistenceExceptionTranslator pet)
Return a translated exception if this is appropriate, otherwise return the given exception as-is.参数类型为PersistenceExceptionTranslator的org.springframework.dao.support中的构造器 构造器 说明 PersistenceExceptionTranslationInterceptor(PersistenceExceptionTranslator pet)
Create a new PersistenceExceptionTranslationInterceptor for the given PersistenceExceptionTranslator.org.springframework.orm.hibernate5中PersistenceExceptionTranslator的使用
实现PersistenceExceptionTranslator的org.springframework.orm.hibernate5中的类 修饰符和类型 类 说明 class
HibernateExceptionTranslator
PersistenceExceptionTranslator
capable of translatingHibernateException
instances to Spring'sDataAccessException
hierarchy.class
LocalSessionFactoryBean
FactoryBean
that creates a HibernateSessionFactory
.org.springframework.orm.jpa中PersistenceExceptionTranslator的使用
org.springframework.orm.jpa中PersistenceExceptionTranslator的子接口 修饰符和类型 接口 说明 interface
JpaDialect
SPI strategy that encapsulates certain functionality that standard JPA 2.1 does not offer, such as access to the underlying JDBC Connection.实现PersistenceExceptionTranslator的org.springframework.orm.jpa中的类 修饰符和类型 类 说明 class
AbstractEntityManagerFactoryBean
AbstractFactoryBean
that creates a local JPAEntityManagerFactory
instance within a Spring application context.class
DefaultJpaDialect
Default implementation of theJpaDialect
interface.class
LocalContainerEntityManagerFactoryBean
FactoryBean
that creates a JPAEntityManagerFactory
according to JPA's standard container bootstrap contract.class
LocalEntityManagerFactoryBean
FactoryBean
that creates a JPAEntityManagerFactory
according to JPA's standard standalone bootstrap contract.org.springframework.orm.jpa.vendor中PersistenceExceptionTranslator的使用
实现PersistenceExceptionTranslator的org.springframework.orm.jpa.vendor中的类 修饰符和类型 类 说明 class
EclipseLinkJpaDialect
JpaDialect
implementation for Eclipse Persistence Services (EclipseLink).class
HibernateJpaDialect
JpaDialect
implementation for Hibernate EntityManager.