1 22 23 package org.jboss.resource.deployment.ds.metadata; 24 25 31 public class AvailabilitySupportMetaData implements DsElementMetaData 32 { 33 34 35 private static final long serialVersionUID = -3988804445826223939L; 36 37 38 private final int support; 39 40 41 private String urlDelimeter; 42 43 44 private String urlProperty; 45 46 private AvailabilitySupportMetaData(int support) 47 { 48 49 this.support = support; 50 51 } 52 53 54 public static final AvailabilitySupportMetaData NONE = new AvailabilitySupportMetaData(0); 55 56 57 public static final AvailabilitySupportMetaData HA_LOCAL = new AvailabilitySupportMetaData(1); 58 59 60 public static final AvailabilitySupportMetaData HA_XA = new AvailabilitySupportMetaData(1); 61 62 public static AvailabilitySupportMetaData fromString(String value) 63 { 64 AvailabilitySupportMetaData amd = null; 65 66 if(value.equals("ha-local-tx-datasource")) 67 { 68 amd = HA_LOCAL; 69 70 }else if(value.equals("ha-xa-datasource")) 71 { 72 amd = HA_XA; 73 74 }else 75 { 76 amd = NONE; 77 78 } 79 80 return amd; 81 } 82 83 public String getUrlDelimeter() 84 { 85 return urlDelimeter; 86 } 87 88 public void setUrlDelimeter(String urlDelimeter) 89 { 90 this.urlDelimeter = urlDelimeter; 91 } 92 93 public String getUrlProperty() 94 { 95 return urlProperty; 96 } 97 98 public void setUrlProperty(String urlProperty) 99 { 100 this.urlProperty = urlProperty; 101 } 102 103 104 } 105 | Popular Tags |