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 @ 40559
History | View | Annotate | Download (3.88 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 |
/* gvSIG. Geographic Information System of the Valencian Government
|
25 |
*
|
26 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
27 |
* of the Valencian Government (CIT)
|
28 |
*
|
29 |
* This program is free software; you can redistribute it and/or
|
30 |
* modify it under the terms of the GNU General Public License
|
31 |
* as published by the Free Software Foundation; either version 2
|
32 |
* of the License, or (at your option) any later version.
|
33 |
*
|
34 |
* This program is distributed in the hope that it will be useful,
|
35 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
36 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
37 |
* GNU General Public License for more details.
|
38 |
*
|
39 |
* You should have received a copy of the GNU General Public License
|
40 |
* along with this program; if not, write to the Free Software
|
41 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
42 |
* MA 02110-1301, USA.
|
43 |
*
|
44 |
*/
|
45 |
|
46 |
/*
|
47 |
* AUTHORS (In addition to CIT):
|
48 |
* 2009 IVER T.I {{Task}}
|
49 |
*/
|
50 |
|
51 |
package org.gvsig.fmap.dal.store.jdbc; |
52 |
|
53 |
import org.gvsig.fmap.dal.resource.db.DBResourceParameters; |
54 |
|
55 |
public class JDBCResourceParameters extends DBResourceParameters |
56 |
implements JDBCConnectionParameters {
|
57 |
|
58 |
protected static final String PARAMETERS_DEFINITION_NAME = "JDBCResourceParameters"; |
59 |
|
60 |
protected JDBCResourceParameters(String parametersDefinitionName, String providerName) { |
61 |
super(parametersDefinitionName,providerName);
|
62 |
} |
63 |
|
64 |
public JDBCResourceParameters() {
|
65 |
this(PARAMETERS_DEFINITION_NAME, JDBCResource.NAME);
|
66 |
} |
67 |
|
68 |
public JDBCResourceParameters(String parametersDefinitionName, String providerName, |
69 |
String url, String host, Integer port, |
70 |
String dbName, String user, String password, |
71 |
String jdbcDriverClassName) {
|
72 |
this(parametersDefinitionName,providerName);
|
73 |
|
74 |
this.setUrl(url);
|
75 |
this.setHost(host);
|
76 |
this.setPort(port);
|
77 |
this.setDBName(dbName);
|
78 |
this.setUser(user);
|
79 |
this.setPassword(password);
|
80 |
this.setJDBCDriverClassName(jdbcDriverClassName);
|
81 |
} |
82 |
|
83 |
public JDBCResourceParameters(String url, String host, Integer port, |
84 |
String dbName,
|
85 |
String user, String password, String jdbcDriverClassName) { |
86 |
this(PARAMETERS_DEFINITION_NAME, JDBCResource.NAME, url, host, port, dbName, user, password, jdbcDriverClassName);
|
87 |
} |
88 |
|
89 |
public void setJDBCDriverClassName(String className) { |
90 |
this.setDynValue(JDBC_DRIVER_CLASS_PARAMTER_NAME, className);
|
91 |
} |
92 |
|
93 |
public String getJDBCDriverClassName() { |
94 |
return (String) this.getDynValue(JDBC_DRIVER_CLASS_PARAMTER_NAME); |
95 |
} |
96 |
|
97 |
public String getCatalog() { |
98 |
return (String) this.getDynValue(CATALOG_PARAMTER_NAME); |
99 |
} |
100 |
|
101 |
public void setCatalog(String catalog) { |
102 |
this.setDynValue(CATALOG_PARAMTER_NAME, catalog);
|
103 |
} |
104 |
|
105 |
public String getSchema() { |
106 |
return (String) this.getDynValue(SCHEMA_PARAMTER_NAME); |
107 |
} |
108 |
|
109 |
public void setSchema(String schema) { |
110 |
this.setDynValue(SCHEMA_PARAMTER_NAME, schema);
|
111 |
} |
112 |
|
113 |
public String getUrl() { |
114 |
return (String) this.getDynValue(URL_PARAMTER_NAME); |
115 |
} |
116 |
|
117 |
public void setUrl(String url) { |
118 |
this.setDynValue(URL_PARAMTER_NAME, url);
|
119 |
} |
120 |
|
121 |
} |