KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > dbforms > conprovider > ConnectionProviderPrefs


1 /*
2  * $Header: /cvsroot/jdbforms/dbforms/src/org/dbforms/conprovider/ConnectionProviderPrefs.java,v 1.8 2004/08/18 12:25:57 hkollmann Exp $
3  * $Revision: 1.8 $
4  * $Date: 2004/08/18 12:25:57 $
5  *
6  * DbForms - a Rapid Application Development Framework
7  * Copyright (C) 2001 Joachim Peer <joepeer@excite.com>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  */

23
24 package org.dbforms.conprovider;
25
26 import java.util.Properties JavaDoc;
27
28 import javax.servlet.ServletContext JavaDoc;
29
30
31
32 /**
33  * Preferences class for Connection Providers.
34  *
35  * @author Luca Fossato
36  */

37 public class ConnectionProviderPrefs {
38    /** Holds connection pool custom properties */
39    private Properties JavaDoc poolProperties;
40
41    /** Holds jdbc properties */
42    private Properties JavaDoc properties;
43    private ServletContext JavaDoc servletContext;
44
45    /** connection pool url */
46    private String JavaDoc connectionPoolURL;
47
48    /** connection provider class name */
49    private String JavaDoc connectionProviderClass;
50
51    /** the JDBC driver class name */
52    private String JavaDoc jdbcDriver;
53
54    /** the JDBC URL string */
55    private String JavaDoc jdbcURL;
56
57    /** database user password */
58    private String JavaDoc password;
59
60    /** database user name */
61    private String JavaDoc user;
62
63    /**
64     * Sets the connectionPoolURL attribute of the ConnectionProviderPrefs
65     * object
66     *
67     * @param connectionPoolURL The new connectionPoolURL value
68     */

69    public void setConnectionPoolURL(String JavaDoc connectionPoolURL) {
70       this.connectionPoolURL = connectionPoolURL;
71    }
72
73
74    /**
75     * Gets the connectionPoolURL attribute of the ConnectionProviderPrefs
76     * object
77     *
78     * @return The connectionPoolURL value
79     */

80    public String JavaDoc getConnectionPoolURL() {
81       return connectionPoolURL;
82    }
83
84
85    /**
86     * Sets the connectionProviderClass attribute of the ConnectionProviderPrefs
87     * object
88     *
89     * @param connectionProviderClass The new connectionProviderClass value
90     */

91    public void setConnectionProviderClass(String JavaDoc connectionProviderClass) {
92       this.connectionProviderClass = connectionProviderClass;
93    }
94
95
96    /**
97     * Gets the connectionProviderClass attribute of the ConnectionProviderPrefs
98     * object
99     *
100     * @return The connectionProviderClass value
101     */

102    public String JavaDoc getConnectionProviderClass() {
103       return connectionProviderClass;
104    }
105
106
107    /**
108     * Sets the jdbcDriver attribute of the ConnectionProviderPrefs object
109     *
110     * @param jdbcDriver The new jdbcDriver value
111     */

112    public void setJdbcDriver(String JavaDoc jdbcDriver) {
113       this.jdbcDriver = jdbcDriver;
114    }
115
116
117    /**
118     * Gets the jdbcDriver attribute of the ConnectionProviderPrefs object
119     *
120     * @return The jdbcDriver value
121     */

122    public String JavaDoc getJdbcDriver() {
123       return jdbcDriver;
124    }
125
126
127    /**
128     * Sets the jdbcURL attribute of the ConnectionProviderPrefs object
129     *
130     * @param jdbcURL The new jdbcURL value
131     */

132    public void setJdbcURL(String JavaDoc jdbcURL) {
133       this.jdbcURL = jdbcURL;
134    }
135
136
137    /**
138     * Gets the jdbcURL attribute of the ConnectionProviderPrefs object
139     *
140     * @return The jdbcURL value
141     */

142    public String JavaDoc getJdbcURL() {
143       return jdbcURL;
144    }
145
146
147    /**
148     * Sets the password attribute of the ConnectionProviderPrefs object
149     *
150     * @param password The new password value
151     */

152    public void setPassword(String JavaDoc password) {
153       this.password = password;
154    }
155
156
157    /**
158     * Gets the password attribute of the ConnectionProviderPrefs object
159     *
160     * @return The password value
161     */

162    public String JavaDoc getPassword() {
163       return password;
164    }
165
166
167    /**
168     * Sets the connection pool custom properties.
169     *
170     * @param poolProperties The pool properties to set
171     */

172    public void setPoolProperties(Properties JavaDoc poolProperties) {
173       this.poolProperties = poolProperties;
174    }
175
176
177    /**
178     * Returns the connection pool custom properties.
179     *
180     * @return Properties
181     */

182    public Properties JavaDoc getPoolProperties() {
183       return poolProperties;
184    }
185
186
187    /**
188     * Sets the properties.
189     *
190     * @param properties The properties to set
191     */

192    public void setProperties(Properties JavaDoc properties) {
193       this.properties = properties;
194    }
195
196
197    /**
198     * Returns the properties.
199     *
200     * @return Properties
201     */

202    public Properties JavaDoc getProperties() {
203       return properties;
204    }
205
206
207    /**
208     * DOCUMENT ME!
209     *
210     * @param context
211     */

212    public void setServletContext(ServletContext JavaDoc context) {
213       servletContext = context;
214    }
215
216
217    /**
218     * DOCUMENT ME!
219     *
220     * @return
221     */

222    public ServletContext JavaDoc getServletContext() {
223       return servletContext;
224    }
225
226
227    /**
228     * Sets the user attribute of the ConnectionProviderPrefs object
229     *
230     * @param user The new user value
231     */

232    public void setUser(String JavaDoc user) {
233       this.user = user;
234    }
235
236
237    /**
238     * Gets the user attribute of the ConnectionProviderPrefs object
239     *
240     * @return The user value
241     */

242    public String JavaDoc getUser() {
243       return user;
244    }
245 }
246
Popular Tags