1 64 package com.jcorporate.expresso.core.dataobjects.jdbc; 65 66 import com.jcorporate.expresso.kernel.ComponentLifecycle; 67 import com.jcorporate.expresso.kernel.Configuration; 68 import com.jcorporate.expresso.kernel.ContainerComponentBase; 69 import com.jcorporate.expresso.kernel.exception.ConfigurationException; 70 71 74 75 public class JdbcPersistenceManager extends ContainerComponentBase implements ComponentLifecycle { 76 77 private String dataURL = null; 78 private String userName = null; 79 private String password = null; 80 private String configName = null; 81 82 83 public JdbcPersistenceManager() { 84 } 85 86 public void initialize() { 87 88 } 89 90 public void configure(Configuration newConfig) throws ConfigurationException { 91 dataURL = (String ) newConfig.get("DataURL"); 92 userName = (String ) newConfig.get("UserName"); 93 password = (String ) newConfig.get("Password"); 94 configName = (String ) newConfig.get("ConfigName"); 95 } 96 97 public void reconfigure(Configuration newConfig) throws ConfigurationException { 98 dataURL = null; 99 userName = null; 100 password = null; 101 configName = null; 102 configure(newConfig); 103 } 104 105 public void destroy() { 106 dataURL = null; 107 userName = null; 108 password = null; 109 configName = null; 110 } 111 112 public void setDataURL(String dataURL) { 113 this.dataURL = dataURL; 114 } 115 116 public String getDataURL() { 117 return dataURL; 118 } 119 120 public void setUserName(String userName) { 121 this.userName = userName; 122 } 123 124 public String getUserName() { 125 return userName; 126 } 127 128 public void setPassword(String password) { 129 this.password = password; 130 } 131 132 public String getPassword() { 133 return password; 134 } 135 136 public void setConfigName(String configName) { 137 this.configName = configName; 138 } 139 140 public String getConfigName() { 141 return configName; 142 } 143 } 144 | Popular Tags |