Class OpenJpaDialect
- java.lang.Object
-
- org.springframework.orm.jpa.DefaultJpaDialect
-
- org.springframework.orm.jpa.vendor.OpenJpaDialect
-
- All Implemented Interfaces:
Serializable
,PersistenceExceptionTranslator
,JpaDialect
public class OpenJpaDialect extends DefaultJpaDialect
JpaDialect
implementation for Apache OpenJPA. Developed and tested against OpenJPA 2.2.- Since:
- 2.0
- Author:
- Juergen Hoeller, Costin Leau
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OpenJpaDialect()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
beginTransaction(javax.persistence.EntityManager entityManager, TransactionDefinition definition)
ConnectionHandle
getJdbcConnection(javax.persistence.EntityManager entityManager, boolean readOnly)
protected static org.apache.openjpa.persistence.OpenJPAEntityManager
getOpenJPAEntityManager(javax.persistence.EntityManager em)
Return the OpenJPA-specific variant ofEntityManager
.-
Methods inherited from class org.springframework.orm.jpa.DefaultJpaDialect
cleanupTransaction, prepareTransaction, releaseJdbcConnection, translateExceptionIfPossible
-
-
-
-
Method Detail
-
beginTransaction
public Object beginTransaction(javax.persistence.EntityManager entityManager, TransactionDefinition definition) throws javax.persistence.PersistenceException, SQLException, TransactionException
- Specified by:
beginTransaction
in interfaceJpaDialect
- Overrides:
beginTransaction
in classDefaultJpaDialect
- Throws:
javax.persistence.PersistenceException
SQLException
TransactionException
-
getJdbcConnection
public ConnectionHandle getJdbcConnection(javax.persistence.EntityManager entityManager, boolean readOnly) throws javax.persistence.PersistenceException, SQLException
- Specified by:
getJdbcConnection
in interfaceJpaDialect
- Overrides:
getJdbcConnection
in classDefaultJpaDialect
- Throws:
javax.persistence.PersistenceException
SQLException
-
getOpenJPAEntityManager
protected static org.apache.openjpa.persistence.OpenJPAEntityManager getOpenJPAEntityManager(javax.persistence.EntityManager em)
Return the OpenJPA-specific variant ofEntityManager
.- Parameters:
em
- the genericEntityManager
instance- Returns:
- the OpenJPA-specific variant of
EntityManager
-
-