1 22 package org.jboss.resource.deployment.ds.metadata; 23 24 30 public class TransactionIsolationMetaData 31 { 32 private final int type; 33 34 35 private TransactionIsolationMetaData(int type) 36 { 37 this.type = type; 38 39 } 40 41 42 public static final TransactionIsolationMetaData READ_UNCOMMITTED = new TransactionIsolationMetaData(0); 43 44 45 public static final TransactionIsolationMetaData READ_COMMITTED = new TransactionIsolationMetaData(1); 46 47 48 public static final TransactionIsolationMetaData REPEATABLE_READ = new TransactionIsolationMetaData(2); 49 50 51 public static final TransactionIsolationMetaData SERIALIZABLE = new TransactionIsolationMetaData(3); 52 53 54 public static final TransactionIsolationMetaData NONE = new TransactionIsolationMetaData(4); 55 56 public static TransactionIsolationMetaData fromString(String value) 57 { 58 TransactionIsolationMetaData imd = null; 59 60 if(value.equals("READ_UNCOMMITTED")) 61 { 62 imd = READ_UNCOMMITTED; 63 64 }else if(value.equals("READ_COMMITTED")) 65 { 66 imd = READ_COMMITTED; 67 68 }else if(value.equals("REPEATABLE_READ")) 69 { 70 71 imd = REPEATABLE_READ; 72 73 }else if(value.equals("SERIALIZABLE")) 74 { 75 imd = SERIALIZABLE; 76 77 }else if(value.equals("NONE")) 78 { 79 imd = NONE; 80 81 } 82 83 return imd; 84 85 } 86 87 } 88 | Popular Tags |