Class TransactionUtils

java.lang.Object
org.datanucleus.transaction.TransactionUtils

public class TransactionUtils extends Object
Utility methods relating to transactions.
  • 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 Manager
      transactionIsolation - Requested isolation level
      Returns:
      Isolation level to use
      Throws:
      TransactionIsolationNotSupportedException - When no suitable level available given the requested level
    • getNameForTransactionIsolationLevel

      public static 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(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