Interface ITransaction
- All Superinterfaces:
AutoCloseable, Closeable
Deprecated.
Needs to sit in a JPMS module for proper use.
Common interface representing a transaction. This interface provides methods to manage the transaction lifecycle,
including committing and rolling back transactions.
Note: Transactions need be set to be committed on close explicitly by calling commit().
Otherwise, the transaction will be rolled back automatically when the context is closed.
This interface extends Closeable to allow for automatic resource management, ensuring that the transaction
is properly closed and resources are released.
Note: This interface is intended for internal use only and should not be implemented by plugins. It may be moved to a different package in the future, so plugins should not depend on it.
- Since:
- 8.5.0
- Author:
- Norman Lorenz
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.Closes the transaction, committing the JPA transaction ifset to do so.voidcommit()Deprecated.Marks the transaction to be committed when the transaction context isclosed.booleanisCommit()Deprecated.Checks if the transaction is marked to be committed when it is closed.voidrollback()Deprecated.Marks the transaction to be rolled back when the transaction context isclosed.
-
Method Details
-
close
void close()Deprecated.Closes the transaction, committing the JPA transaction ifset to do so.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- See Also:
-
commit
void commit()Deprecated.Marks the transaction to be committed when the transaction context isclosed.- See Also:
-
isCommit
boolean isCommit()Deprecated.Checks if the transaction is marked to be committed when it is closed.- Returns:
- true if the transaction is set to be committed, false otherwise
- See Also:
-
rollback
void rollback()Deprecated.Marks the transaction to be rolled back when the transaction context isclosed.- See Also:
-