|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.jpa.JpaTransaction
public class JpaTransaction
A JPA wrapper around a Cayenne Transaction. For more info see this page.
Field Summary | |
---|---|
protected EntityManager |
entityManager
|
protected boolean |
rollbackOnly
|
protected Transaction |
transaction
|
Constructor Summary | |
---|---|
JpaTransaction(Transaction transaction,
EntityManager entityManager)
|
Method Summary | |
---|---|
void |
begin()
Start a resource transaction. |
void |
commit()
Commit the current transaction, writing any unflushed changes to the database. |
boolean |
getRollbackOnly()
|
boolean |
isActive()
Indicate whether a transaction is in progress. |
void |
rollback()
Roll back the current transaction. |
void |
setRollbackOnly()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EntityManager entityManager
protected Transaction transaction
protected boolean rollbackOnly
Constructor Detail |
---|
public JpaTransaction(Transaction transaction, EntityManager entityManager)
Method Detail |
---|
public void begin()
IllegalStateException
- if isActive() is true.public void commit()
IllegalStateException
- if isActive() is false.
PersistenceException
- if the commit fails.public void rollback()
IllegalStateException
- if isActive() is false.
PersistenceException
- if an unexpected error condition is encountered.public boolean isActive()
PersistenceException
- if an unexpected error condition is encountered.public boolean getRollbackOnly()
public void setRollbackOnly()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |