public static int transactionFromString ( String txIsolation ) throws SQLException { switch ( txIsolation ) { //tx_isolation case "READ-UNCOMMITTED" : return Connection . TRANSACTION_READ_UNCOMMITTED ; case "READ-COMMITTED" : return Connection . TRANSACTION_READ_COMMITTED ; case "REPEATABLE-READ" : return Connection . TRANSACTION_REPEATABLE_READ ; case "SERIALIZABLE" : return Connection . TRANSACTION_SERIALIZABLE ; default : throw new SQLException ( "unknown transaction isolation level" ) ; } }
Traduce a String value of transaction isolation to corresponding java value .