root/tools/routingservice/trunk/src/jp/co/orkney/restlet/util/DatabaseConfiguration.java

Revision 164, 3.6 KB (checked in by anton, 3 years ago)

Distance limitation added

Line 
1package jp.co.orkney.restlet.util;
2
3/**
4 * Copyright (c) 2007 Orkney, Inc. <http://www.orkney.co.jp/>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20/**
21 * <b>DatabaseConfiguration is a class which represents a database configuration</b>
22 * <p>
23 * DatabaseConfiguration object is characterized by the following information:
24 * <ul>
25 * <li>A database driver</li>
26 * <li>An URL</li>
27 * <li>An user name</li>
28 * <li>A password</li>
29 * </ul>
30 * </p>
31 *
32 * @author Matthieu Bilbille - Orkney Inc.
33 * @version 1.0
34 */
35public class DatabaseConfiguration
36{
37        private String driver;
38        private String url;
39        private String user;
40        private String password;
41
42        /**
43         * Constructor DatabaseConfiguration.
44         * <p>
45         * Creates a new database configuration with empty data (driver, url, ...)
46         * </p>
47         */
48        public DatabaseConfiguration()
49        {
50                driver = "";
51                url = "";
52                user = "";
53                password = "";
54        }
55
56        /**
57         * Constructor DatabaseConfiguration.
58         * <p>
59         * Creates a new database configuration with the specified data (driver,
60         * url, ...).
61         * </p>
62         *
63         * @param driver
64         *            database driver
65         * @param url
66         *            database url
67         * @param user
68         *            an user name
69         * @param password
70         *            the password associated with this user
71         */
72        public DatabaseConfiguration(String driver, String url, String user, String password)
73        {
74                this.driver = driver;
75                this.url = url;
76                this.user = user;
77                this.password = password;
78        }
79
80        /**
81         * Gets the driver of the database configuration
82         *
83         * @return this database configuration's driver
84         */
85        public String getDriver()
86        {
87                return driver;
88        }
89
90        /**
91         * Sets the driver of the database configuration to the specified string.
92         *
93         * @param driver
94         *            the string that is to be this database configuration's driver
95         */
96        public void setDriver(String driver)
97        {
98                this.driver = driver;
99        }
100
101        /**
102         * Gets the URL of the database configuration
103         *
104         * @return this database configuration's URL
105         */
106        public String getURL()
107        {
108                return url;
109        }
110
111        /**
112         * Sets the URL of the database configuration to the specified string.
113         *
114         * @param url
115         *            the string that is to be this database configuration's URL
116         */
117        public void setURL(String url)
118        {
119                this.url = url;
120        }
121
122        /**
123         * Gets the user name of the database configuration
124         *
125         * @return this database configuration's user name
126         */
127        public String getUser()
128        {
129                return user;
130        }
131
132        /**
133         * Sets the user name of the database configuration to the specified string.
134         *
135         * @param user
136         *            the string that is to be this database configuration's user
137         */
138        public void setUser(String user)
139        {
140                this.user = user;
141        }
142
143        /**
144         * Gets the password of the database configuration
145         *
146         * @return this database configuration's password
147         */
148        public String getPassword()
149        {
150                return password;
151        }
152
153        /**
154         * Sets the password of the database configuration to the specified string.
155         *
156         * @param password
157         *            the string that is to be this database configuration's
158         *            password
159         */
160        public void setPassword(String password)
161        {
162                this.password = password;
163        }
164
165}
Note: See TracBrowser for help on using the browser.