public interface JpaTransaction
extends com.holonplatform.core.datastore.transaction.Transaction
Transaction.com.holonplatform.core.datastore.transaction.TransactionStatus.IllegalTransactionStatusException, com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException, com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionNotSupportedException| Modifier and Type | Method and Description |
|---|---|
static JpaTransaction |
create(javax.persistence.EntityManager entityManager,
com.holonplatform.core.datastore.transaction.TransactionConfiguration configuration)
Create a new
JpaTransaction. |
static JpaTransaction |
delegate(JpaTransaction delegated)
Create a
JpaTransaction which delegates its operations and status to the given delegated transaction. |
void |
end()
Finalize the transaction.
|
com.holonplatform.core.datastore.transaction.TransactionConfiguration |
getConfiguration()
Get the transaction configuration.
|
javax.persistence.EntityManager |
getEntityManager()
Get the
EntityManager which owns the transaction. |
void |
start()
Start the transaction, configuring the connection.
|
void start()
throws com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException
TransactionException - If an error occurredcom.holonplatform.core.datastore.transaction.TransactionStatus.TransactionExceptionvoid end() throws com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException
TransactionException - If an error occurredcom.holonplatform.core.datastore.transaction.TransactionStatus.TransactionExceptionjavax.persistence.EntityManager getEntityManager()
EntityManager which owns the transaction.EntityManagercom.holonplatform.core.datastore.transaction.TransactionConfiguration getConfiguration()
static JpaTransaction create(javax.persistence.EntityManager entityManager, com.holonplatform.core.datastore.transaction.TransactionConfiguration configuration)
JpaTransaction.entityManager - EntityManager (not null)configuration - Transaction configuration (not null)JpaTransaction implementationstatic JpaTransaction delegate(JpaTransaction delegated)
JpaTransaction which delegates its operations and status to the given delegated transaction.
The delegated transaction returns false from the TransactionStatus.isNew() method.
delegated - Delegated transaction (not null)JpaTransaction implementationCopyright © 2019 The Holon Platform. All rights reserved.