Package org.datanucleus.transaction
Class TransactionUtils
- java.lang.Object
-
- org.datanucleus.transaction.TransactionUtils
-
public class TransactionUtils extends java.lang.Object
Utility methods relating to transactions.
-
-
Constructor Summary
Constructors Constructor Description TransactionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getNameForTransactionIsolationLevel(int isolation)
Accessor for a string name of a transaction isolation level.static java.lang.String
getTransactionIsolationForStoreManager(StoreManager storeMgr, java.lang.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(java.lang.String isolationName)
Convenience method to convert the supplied isolation level name into the associated UserTransaction type number.
-
-
-
Method Detail
-
getTransactionIsolationForStoreManager
public static java.lang.String getTransactionIsolationForStoreManager(StoreManager storeMgr, java.lang.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
public static java.lang.String getNameForTransactionIsolationLevel(int isolation)
Accessor for a string name of a transaction isolation level.- Parameters:
isolation
- The isolation level (as defined by UserTransaction).- Returns:
- The name
-
getTransactionIsolationLevelForName
public static int getTransactionIsolationLevelForName(java.lang.String isolationName)
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
-
-