Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.db / org.gvsig.fmap.dal.db.jdbc / src / main / java / org / gvsig / fmap / dal / store / jdbc / JDBCResourceParameters.java @ 40596

History | View | Annotate | Download (2.95 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (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, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24

    
25
package org.gvsig.fmap.dal.store.jdbc;
26

    
27
import org.gvsig.fmap.dal.resource.db.DBResourceParameters;
28

    
29
public class JDBCResourceParameters extends DBResourceParameters
30
                implements JDBCConnectionParameters {
31

    
32
    protected static final String PARAMETERS_DEFINITION_NAME = "JDBCResourceParameters";
33

    
34
        protected JDBCResourceParameters(String parametersDefinitionName, String providerName) {
35
                super(parametersDefinitionName,providerName);
36
        }
37
        
38
        public JDBCResourceParameters() {
39
                this(PARAMETERS_DEFINITION_NAME, JDBCResource.NAME);
40
        }
41

    
42
    public JDBCResourceParameters(String parametersDefinitionName, String providerName, 
43
                    String url, String host, Integer port,
44
                        String dbName, String user, String password, 
45
                        String jdbcDriverClassName) {
46
                this(parametersDefinitionName,providerName);
47

    
48
                this.setUrl(url);
49
                this.setHost(host);
50
                this.setPort(port);
51
                this.setDBName(dbName);
52
                this.setUser(user);
53
                this.setPassword(password);
54
                this.setJDBCDriverClassName(jdbcDriverClassName);
55
        }
56

    
57
    public JDBCResourceParameters(String url, String host, Integer port,
58
                        String dbName,
59
                        String user, String password, String jdbcDriverClassName) {
60
                this(PARAMETERS_DEFINITION_NAME, JDBCResource.NAME, url, host, port, dbName, user, password, jdbcDriverClassName);
61
        }
62

    
63
        public void setJDBCDriverClassName(String className) {
64
                this.setDynValue(JDBC_DRIVER_CLASS_PARAMTER_NAME, className);
65
        }
66

    
67
        public String getJDBCDriverClassName() {
68
                return (String) this.getDynValue(JDBC_DRIVER_CLASS_PARAMTER_NAME);
69
        }
70

    
71
        public String getCatalog() {
72
                return (String) this.getDynValue(CATALOG_PARAMTER_NAME);
73
        }
74

    
75
        public void setCatalog(String catalog) {
76
                this.setDynValue(CATALOG_PARAMTER_NAME, catalog);
77
        }
78

    
79
        public String getSchema() {
80
                return (String) this.getDynValue(SCHEMA_PARAMTER_NAME);
81
        }
82

    
83
        public void setSchema(String schema) {
84
                this.setDynValue(SCHEMA_PARAMTER_NAME, schema);
85
        }
86

    
87
        public String getUrl() {
88
                return (String) this.getDynValue(URL_PARAMTER_NAME);
89
        }
90

    
91
        public void setUrl(String url) {
92
                this.setDynValue(URL_PARAMTER_NAME, url);
93
        }
94

    
95
}