Class Overview
JpaDialect
implementation for
Apache OpenJPA. Developed and tested against OpenJPA 0.9.7.
Summary
Protected Methods |
OpenJPAEntityManager
|
getOpenJPAEntityManager(EntityManager em)
Return the OpenJPA-specific interface of EntityManager .
|
[Expand]
Inherited Methods |
From class
org.springframework.orm.jpa.DefaultJpaDialect
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.dao.support.PersistenceExceptionTranslator
|
From interface
org.springframework.orm.jpa.JpaDialect
abstract
Object
|
beginTransaction(EntityManager entityManager, TransactionDefinition definition)
Begin the given JPA transaction, applying the semantics specified by the
given Spring transaction definition (in particular, an isolation level
and a timeout).
|
abstract
void
|
cleanupTransaction(Object transactionData)
Clean up the transaction via the given transaction data.
|
abstract
EntityManagerFactoryPlusOperations
|
getEntityManagerFactoryPlusOperations(EntityManagerFactory rawEntityManager)
Return an EntityManagerFactoryPlusOperations implementation for
the given raw EntityManagerFactory.
|
abstract
EntityManagerPlusOperations
|
getEntityManagerPlusOperations(EntityManager rawEntityManager)
Return an EntityManagerPlusOperations implementation for
the given raw EntityManager.
|
abstract
ConnectionHandle
|
getJdbcConnection(EntityManager entityManager, boolean readOnly)
Retrieve the JDBC Connection that the given JPA EntityManager uses underneath,
if accessing a relational database.
|
abstract
Object
|
prepareTransaction(EntityManager entityManager, boolean readOnly, String name)
Prepare a JPA transaction, applying the specified semantics.
|
abstract
void
|
releaseJdbcConnection(ConnectionHandle conHandle, EntityManager entityManager)
Release the given JDBC Connection, which has originally been retrieved
via getJdbcConnection .
|
abstract
boolean
|
supportsEntityManagerFactoryPlusOperations()
Return whether the EntityManagerFactoryPlus(Operations) interface is
supported by this provider.
|
abstract
boolean
|
supportsEntityManagerPlusOperations()
Return whether the EntityManagerPlus(Operations) interface is
supported by this provider.
|
|
Public Constructors
Public Methods
public
Object
beginTransaction
(EntityManager entityManager, TransactionDefinition definition)
This implementation invokes the standard JPA Transaction.begin
method. Throws an InvalidIsolationLevelException if a non-default isolation
level is set.
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 (null
) of this implementation
and are free to return their own transaction data Object.
Parameters
entityManager
| the EntityManager to begin a JPA transaction on |
definition
| the Spring transaction definition that defines semantics |
public
ConnectionHandle
getJdbcConnection
(EntityManager entityManager, boolean readOnly)
This implementation always returns null
,
indicating that no JDBC Connection can be provided.
Parameters
entityManager
| the current JPA EntityManager |
readOnly
| whether the Connection is only needed for read-only purposes |
Returns
- a handle for the JDBC Connection, to be passed into
releaseJdbcConnection
, or null
if no JDBC Connection can be retrieved
Protected Methods
protected
OpenJPAEntityManager
getOpenJPAEntityManager
(EntityManager em)
Return the OpenJPA-specific interface of EntityManager
.
Parameters
em
| the generic EntityManager instance |
Returns
- the OpenJPA-specific interface of
EntityManager