Package org.datanucleus.transaction
Class TransactionUtils
java.lang.Object
org.datanucleus.transaction.TransactionUtils
Utility methods relating to transactions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getNameForTransactionIsolationLevel
(int isolation) Accessor for a string name of a transaction isolation level.static String
getTransactionIsolationForStoreManager
(StoreManager storeMgr, String transactionIsolation) Method to return the transaction isolation level that will be used for the provided StoreManager bearing in mind the specified level the user requested.static int
getTransactionIsolationLevelForName
(String isolationName) Convenience method to convert the supplied isolation level name into the associated UserTransaction type number.
-
Constructor Details
-
TransactionUtils
public TransactionUtils()
-
-
Method Details
-
getTransactionIsolationForStoreManager
public static String getTransactionIsolationForStoreManager(StoreManager storeMgr, String transactionIsolation) Method to return the transaction isolation level that will be used for the provided StoreManager bearing in mind the specified level the user requested.- Parameters:
storeMgr
- The Store ManagertransactionIsolation
- Requested isolation level- Returns:
- Isolation level to use
- Throws:
TransactionIsolationNotSupportedException
- When no suitable level available given the requested level
-
getNameForTransactionIsolationLevel
Accessor for a string name of a transaction isolation level.- Parameters:
isolation
- The isolation level (as defined by UserTransaction).- Returns:
- The name
-
getTransactionIsolationLevelForName
Convenience method to convert the supplied isolation level name into the associated UserTransaction type number.- Parameters:
isolationName
- The name of the isolation level- Returns:
- Isolation level type
-