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