1 /*** 2 * The contents of this file are subject to the Mozilla Public 3 * License Version 1.1 (the "License"); you may not use this file 4 * except in compliance with the License. You may obtain a copy of 5 * the License at http://www.mozilla.org/MPL/ 6 * 7 * Software distributed under the License is distributed on an "AS 8 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 9 * implied. See the License for the specific language governing 10 * rights and limitations under the License. 11 * 12 * The Original Code is pow2toolkit library. 13 * 14 * The Initial Owner of the Original Code is 15 * Power Of Two S.R.L. (www.pow2.com) 16 * 17 * Portions created by Power Of Two S.R.L. are 18 * Copyright (C) Power Of Two S.R.L. 19 * All Rights Reserved. 20 * 21 * Contributor(s): 22 * 23 * Henner Kollman <Henner.Kollmann@aucos.de> 24 * adds the support for JDBC preferences 25 */ 26 27 package com.pow2.dao; 28 29 import java.util.*; 30 31 /*** 32 * Preferences class for Connection Providers 33 * 34 * @author Luca Fossato <fossato@pow2.com> 35 * @created 25 giugno 2002 36 */ 37 public class ConnectionProviderPrefs 38 { 39 /*** connection provider class name */ 40 private String connectionProviderClass; 41 42 /*** connection pool url */ 43 private String connectionPoolURL; 44 45 /*** the JDBC driver class name */ 46 private String jdbcDriver; 47 48 /*** the JDBC URL string */ 49 private String jdbcURL; 50 51 /*** database user name */ 52 private String user; 53 54 /*** database user password */ 55 private String password; 56 57 /*** Holds jdbc properties * */ 58 private Properties properties; 59 60 61 /*** 62 * Gets the connectionProviderClass attribute of the ConnectionProviderPrefs object 63 * 64 * @return The connectionProviderClass value 65 */ 66 public String getConnectionProviderClass() 67 { 68 return connectionProviderClass; 69 } 70 71 72 /*** 73 * Gets the connectionPoolURL attribute of the ConnectionProviderPrefs object 74 * 75 * @return The connectionPoolURL value 76 */ 77 public String getConnectionPoolURL() 78 { 79 return connectionPoolURL; 80 } 81 82 83 /*** 84 * Gets the jdbcURL attribute of the ConnectionProviderPrefs object 85 * 86 * @return The jdbcURL value 87 */ 88 public String getJdbcURL() 89 { 90 return jdbcURL; 91 } 92 93 94 /*** 95 * Gets the jdbcDriver attribute of the ConnectionProviderPrefs object 96 * 97 * @return The jdbcDriver value 98 */ 99 public String getJdbcDriver() 100 { 101 return jdbcDriver; 102 } 103 104 105 /*** 106 * Gets the password attribute of the ConnectionProviderPrefs object 107 * 108 * @return The password value 109 */ 110 public String getPassword() 111 { 112 return password; 113 } 114 115 116 /*** 117 * Gets the user attribute of the ConnectionProviderPrefs object 118 * 119 * @return The user value 120 */ 121 public String getUser() 122 { 123 return user; 124 } 125 126 127 /*** 128 * Sets the user attribute of the ConnectionProviderPrefs object 129 * 130 * @param user The new user value 131 */ 132 public void setUser(String user) 133 { 134 this.user = user; 135 } 136 137 138 /*** 139 * Sets the password attribute of the ConnectionProviderPrefs object 140 * 141 * @param password The new password value 142 */ 143 public void setPassword(String password) 144 { 145 this.password = password; 146 } 147 148 149 /*** 150 * Sets the jdbcURL attribute of the ConnectionProviderPrefs object 151 * 152 * @param jdbcURL The new jdbcURL value 153 */ 154 public void setJdbcURL(String jdbcURL) 155 { 156 this.jdbcURL = jdbcURL; 157 } 158 159 160 /*** 161 * Sets the jdbcDriver attribute of the ConnectionProviderPrefs object 162 * 163 * @param jdbcDriver The new jdbcDriver value 164 */ 165 public void setJdbcDriver(String jdbcDriver) 166 { 167 this.jdbcDriver = jdbcDriver; 168 } 169 170 171 /*** 172 * Sets the connectionPoolURL attribute of the ConnectionProviderPrefs object 173 * 174 * @param connectionPoolURL The new connectionPoolURL value 175 */ 176 public void setConnectionPoolURL(String connectionPoolURL) 177 { 178 this.connectionPoolURL = connectionPoolURL; 179 } 180 181 182 /*** 183 * Sets the connectionProviderClass attribute of the ConnectionProviderPrefs object 184 * 185 * @param connectionProviderClass The new connectionProviderClass value 186 */ 187 public void setConnectionProviderClass(String connectionProviderClass) 188 { 189 this.connectionProviderClass = connectionProviderClass; 190 } 191 192 193 /*** 194 * Returns the properties. 195 * 196 * @return Properties 197 */ 198 public Properties getProperties() 199 { 200 return properties; 201 } 202 203 204 /*** 205 * Sets the properties. 206 * 207 * @param properties The properties to set 208 */ 209 public void setProperties(Properties properties) 210 { 211 this.properties = properties; 212 } 213 }