程序包 org.springframework.orm.hibernate5
Package providing integration of Hibernate 5.x with Spring concepts.
Contains an implementation of Spring's transaction SPI for local Hibernate transactions. This package is intentionally rather minimal, with no template classes or the like, in order to follow Hibernate recommendations as closely as possible. We recommend using Hibernate's native sessionFactory.getCurrentSession() style.
This package supports Hibernate 5.x only.
接口概要 接口 说明 HibernateCallback<T> Callback interface for Hibernate code.HibernateOperations Interface that specifies a common set of Hibernate operations as well as a generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)method for Session-based lambda expressions.类概要 类 说明 HibernateExceptionTranslator PersistenceExceptionTranslatorcapable of translatingHibernateExceptioninstances to Spring'sDataAccessExceptionhierarchy.HibernateTemplate Helper class that simplifies Hibernate data access code.HibernateTransactionManager PlatformTransactionManagerimplementation for a single HibernateSessionFactory.LocalSessionFactoryBean FactoryBeanthat creates a HibernateSessionFactory.LocalSessionFactoryBuilder A Spring-provided extension of the standard HibernateConfigurationclass, addingSpringSessionContextas a default and providing convenient ways to specify a JDBCDataSourceand an application class loader.SessionFactoryUtils Helper class featuring methods for Hibernate Session handling.SessionHolder Resource holder wrapping a HibernateSession(plus an optionalTransaction).SpringBeanContainer Spring's implementation of Hibernate 5.3'sBeanContainerSPI, delegating to a SpringConfigurableListableBeanFactory.SpringFlushSynchronization Simple synchronization adapter that propagates aflush()call to the underlying Hibernate Session.SpringJtaSessionContext Spring-specific subclass of Hibernate's JTASessionContext, settingFlushMode.MANUALfor read-only transactions.SpringSessionContext Implementation of Hibernate 3.1'sCurrentSessionContextinterface that delegates to Spring'sSessionFactoryUtilsfor providing a Spring-managed currentSession.SpringSessionSynchronization Callback for resource cleanup at the end of a Spring-managed transaction for a pre-bound Hibernate Session.异常错误概要 异常错误 说明 HibernateJdbcException Hibernate-specific subclass of UncategorizedDataAccessException, for JDBC exceptions that Hibernate wrapped.HibernateObjectRetrievalFailureException Hibernate-specific subclass of ObjectRetrievalFailureException.HibernateOptimisticLockingFailureException Hibernate-specific subclass of ObjectOptimisticLockingFailureException.HibernateQueryException Hibernate-specific subclass of InvalidDataAccessResourceUsageException, thrown on invalid HQL query syntax.HibernateSystemException Hibernate-specific subclass of UncategorizedDataAccessException, for Hibernate system errors that do not match any concreteorg.springframework.daoexceptions.