Package org.nuiton.topia.persistence
Interface TopiaTransaction
- All Known Subinterfaces:
TopiaPersistenceContext
- All Known Implementing Classes:
AbstractTopiaPersistenceContext
public interface TopiaTransaction
This contract represents a transaction and provides methods to manipulate it.
- Since:
- 3.0
- Author:
- Arnaud Thimel (Code Lutin)
-
Method Summary
Modifier and TypeMethodDescriptionvoidcommit()Applies all the modifications made to this context on the persistence device.voidrollback()Cancels all the modifications made to this context, coming back to the state when this transaction has been created (usingTopiaApplicationContext.newPersistenceContext()) or previously rollbacked (using the current method).
-
Method Details
-
commit
void commit()Applies all the modifications made to this context on the persistence device. Once commit is done, a new internal transaction is started, but you do not have to get a new instance ofTopiaTransaction. -
rollback
void rollback()Cancels all the modifications made to this context, coming back to the state when this transaction has been created (usingTopiaApplicationContext.newPersistenceContext()) or previously rollbacked (using the current method). Once rollback is done, a new internal transaction is started, but you do not have to get a new instance ofTopiaTransaction.
-