open class DefaultJpaDialect : JpaDialect, Serializable
Default implementation of the JpaDialect interface. Used as default dialect by JpaTransactionManager.
Simply begins a standard JPA transaction in #beginTransaction
and performs standard exception translation through EntityManagerFactoryUtils.
NOTE: Spring's JPA support requires JPA 2.1 or higher, as of Spring 5.0.
Author
Juergen Hoeller
Since
2.0
See Also
JpaTransactionManager#setJpaDialect
DefaultJpaDialect()
Default implementation of the JpaDialect interface. Used as default dialect by JpaTransactionManager. Simply begins a standard JPA transaction in NOTE: Spring's JPA support requires JPA 2.1 or higher, as of Spring 5.0. |
open fun beginTransaction(entityManager: EntityManager, definition: TransactionDefinition): Any
This implementation invokes the standard JPA This implementation does not return any transaction data Object, since there is no state to be kept for a standard JPA transaction. Hence, subclasses do not have to care about the return value ( |
|
open fun cleanupTransaction(transactionData: Any): Unit
This implementation does nothing, since the default |
|
open fun getJdbcConnection(entityManager: EntityManager, readOnly: Boolean): ConnectionHandle
This implementation always returns |
|
open fun prepareTransaction(entityManager: EntityManager, readOnly: Boolean, name: String): Any |
|
open fun releaseJdbcConnection(conHandle: ConnectionHandle, em: EntityManager): Unit
This implementation does nothing, assuming that the Connection will implicitly be closed with the EntityManager. If the JPA implementation returns a Connection handle that it expects the application to close after use, the dialect implementation needs to invoke |
|
open fun translateExceptionIfPossible(ex: RuntimeException): DataAccessException
This implementation delegates to EntityManagerFactoryUtils. |
open class HibernateJpaDialect : DefaultJpaDialect
org.springframework.orm.jpa.JpaDialect implementation for Hibernate EntityManager. Developed against Hibernate 5.0/5.1/5.2. |