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 @ 40435
History | View | Annotate | Download (2.94 KB)
1 | 40435 | jjdelcerro | /* gvSIG. Geographic Information System of the Valencian Government
|
---|---|---|---|
2 | *
|
||
3 | * Copyright (C) 2007-2008 Infrastructures and Transports Department
|
||
4 | * of the Valencian Government (CIT)
|
||
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 2
|
||
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 | */
|
||
22 | |||
23 | /*
|
||
24 | * AUTHORS (In addition to CIT):
|
||
25 | * 2009 IVER T.I {{Task}}
|
||
26 | */
|
||
27 | |||
28 | package org.gvsig.fmap.dal.store.jdbc; |
||
29 | |||
30 | import org.gvsig.fmap.dal.resource.db.DBResourceParameters; |
||
31 | |||
32 | public class JDBCResourceParameters extends DBResourceParameters |
||
33 | implements JDBCConnectionParameters {
|
||
34 | |||
35 | protected static final String PARAMETERS_DEFINITION_NAME = "JDBCResourceParameters"; |
||
36 | |||
37 | protected JDBCResourceParameters(String parametersDefinitionName, String providerName) { |
||
38 | super(parametersDefinitionName,providerName);
|
||
39 | } |
||
40 | |||
41 | public JDBCResourceParameters() {
|
||
42 | this(PARAMETERS_DEFINITION_NAME, JDBCResource.NAME);
|
||
43 | } |
||
44 | |||
45 | public JDBCResourceParameters(String parametersDefinitionName, String providerName, |
||
46 | String url, String host, Integer port, |
||
47 | String dbName, String user, String password, |
||
48 | String jdbcDriverClassName) {
|
||
49 | this(parametersDefinitionName,providerName);
|
||
50 | |||
51 | this.setUrl(url);
|
||
52 | this.setHost(host);
|
||
53 | this.setPort(port);
|
||
54 | this.setDBName(dbName);
|
||
55 | this.setUser(user);
|
||
56 | this.setPassword(password);
|
||
57 | this.setJDBCDriverClassName(jdbcDriverClassName);
|
||
58 | } |
||
59 | |||
60 | public JDBCResourceParameters(String url, String host, Integer port, |
||
61 | String dbName,
|
||
62 | String user, String password, String jdbcDriverClassName) { |
||
63 | this(PARAMETERS_DEFINITION_NAME, JDBCResource.NAME, url, host, port, dbName, user, password, jdbcDriverClassName);
|
||
64 | } |
||
65 | |||
66 | public void setJDBCDriverClassName(String className) { |
||
67 | this.setDynValue(JDBC_DRIVER_CLASS_PARAMTER_NAME, className);
|
||
68 | } |
||
69 | |||
70 | public String getJDBCDriverClassName() { |
||
71 | return (String) this.getDynValue(JDBC_DRIVER_CLASS_PARAMTER_NAME); |
||
72 | } |
||
73 | |||
74 | public String getCatalog() { |
||
75 | return (String) this.getDynValue(CATALOG_PARAMTER_NAME); |
||
76 | } |
||
77 | |||
78 | public void setCatalog(String catalog) { |
||
79 | this.setDynValue(CATALOG_PARAMTER_NAME, catalog);
|
||
80 | } |
||
81 | |||
82 | public String getSchema() { |
||
83 | return (String) this.getDynValue(SCHEMA_PARAMTER_NAME); |
||
84 | } |
||
85 | |||
86 | public void setSchema(String schema) { |
||
87 | this.setDynValue(SCHEMA_PARAMTER_NAME, schema);
|
||
88 | } |
||
89 | |||
90 | public String getUrl() { |
||
91 | return (String) this.getDynValue(URL_PARAMTER_NAME); |
||
92 | } |
||
93 | |||
94 | public void setUrl(String url) { |
||
95 | this.setDynValue(URL_PARAMTER_NAME, url);
|
||
96 | } |
||
97 | |||
98 | } |