public static int getTransactionIsolation ( final String transactionIsolationName ) { if ( transactionIsolationName != null ) { try { // use the english locale to avoid the infamous turkish locale bug final String upperCaseIsolationLevelName = transactionIsolationName . toUpperCase ( Locale . ENGLISH ) ; return IsolationLevel . valueOf ( upperCaseIsolationLevelName ) . getLevelId ( ) ; } catch ( Exception e ) { throw new IllegalArgumentException ( "Invalid transaction isolation value: " + transactionIsolationName ) ; } } return - 1 ; }
Get the int value of a transaction isolation level by name .