1 21 package oracle.toplink.essentials.internal.ejb.cmp3.base; 23 24 import java.io.StringWriter ; 25 26 38 public class DataSourceConfig { 39 40 41 public String dsName; 42 43 44 public String jndiName; 45 46 47 public String url; 48 49 50 public String driver; 51 52 53 public String user; 54 55 56 public String password; 57 58 68 public DataSourceConfig(String dsName, String jndiName, String url, String driver, String user, String password) { 69 this.dsName = dsName; 70 this.jndiName = jndiName; 71 this.url = url; 72 this.driver = driver; 73 this.user = user; 74 this.password = password; 75 } 76 77 80 public String toString() { 81 StringWriter writer = new StringWriter (); 82 if(dsName != null) { 83 writer.write("dsName = " + dsName + '\n'); 84 } 85 if(jndiName != null) { 86 writer.write("jndiName = " + jndiName + '\n'); 87 } 88 if(url != null) { 89 writer.write("url = " + url + '\n'); 90 } 91 if(driver != null) { 92 writer.write("driver = " + driver + '\n'); 93 } 94 if(user != null) { 95 writer.write("user = " + user + '\n'); 96 } 97 return writer.toString(); 98 } 99 } 100 | Popular Tags |