svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_daldb / src / org / gvsig / fmap / dal / store / jdbc / JDBCServerExplorerParameters.java @ 28967
History | View | Annotate | Download (3.38 KB)
1 |
/* 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 |
/**
|
29 |
*
|
30 |
*/
|
31 |
package org.gvsig.fmap.dal.store.jdbc; |
32 |
|
33 |
import org.gvsig.fmap.dal.DataTypes; |
34 |
import org.gvsig.fmap.dal.serverexplorer.db.DBServerExplorerParameters; |
35 |
import org.gvsig.tools.ToolsLocator; |
36 |
import org.gvsig.tools.dynobject.DynClass; |
37 |
import org.gvsig.tools.dynobject.DynField; |
38 |
import org.gvsig.tools.dynobject.DynObjectManager; |
39 |
|
40 |
/**
|
41 |
* @author jmvivo
|
42 |
*
|
43 |
*/
|
44 |
public class JDBCServerExplorerParameters extends |
45 |
DBServerExplorerParameters implements JDBCConnectionParameters {
|
46 |
public static final String DYNCLASS_NAME = "JDBCServerExplorerParameters"; |
47 |
|
48 |
public static final String DYNFIELDNAME_SHOWINFORMATIONDBTABLES = "showInformationDBTables"; |
49 |
|
50 |
protected DynClass registerDynClass() {
|
51 |
DynObjectManager dynman = ToolsLocator.getDynObjectManager(); |
52 |
DynClass dynClass = dynman.get(DYNCLASS_NAME); |
53 |
DynField field; |
54 |
|
55 |
if (dynClass == null) { |
56 |
dynClass = dynman.add(DYNCLASS_NAME); |
57 |
|
58 |
dynClass.extend(super.registerDynClass());
|
59 |
|
60 |
dynClass.extend(JDBCResourceParameters.DYNCLASS_NAME); |
61 |
|
62 |
|
63 |
field = dynClass.addDynField(DYNFIELDNAME_SHOWINFORMATIONDBTABLES); |
64 |
field.setTheTypeOfAvailableValues(DynField.SINGLE); |
65 |
field.setDescription("Show information tables");
|
66 |
field.setType(DataTypes.BOOLEAN); |
67 |
field.setDefaultValue(Boolean.FALSE);
|
68 |
|
69 |
} |
70 |
return dynClass;
|
71 |
} |
72 |
|
73 |
public void setJDBCDriverClassName(String className) { |
74 |
this.setDynValue(DYNFIELDNAME_JDBC_DRIVER_CLASS_NAME, className);
|
75 |
} |
76 |
|
77 |
public String getJDBCDriverClassName() { |
78 |
return (String) this.getDynValue(DYNFIELDNAME_JDBC_DRIVER_CLASS_NAME); |
79 |
} |
80 |
|
81 |
public String getCatalog() { |
82 |
return (String) this.getDynValue(DYNFIELDNAME_CATALOG); |
83 |
} |
84 |
|
85 |
public void setCatalog(String catalog) { |
86 |
this.setDynValue(DYNFIELDNAME_CATALOG, catalog);
|
87 |
} |
88 |
|
89 |
public String getSchema() { |
90 |
return (String) this.getDynValue(DYNFIELDNAME_SCHEMA); |
91 |
} |
92 |
|
93 |
public void setSchema(String schema) { |
94 |
this.setDynValue(DYNFIELDNAME_SCHEMA, schema);
|
95 |
} |
96 |
|
97 |
public void setShowInformationDBTables(boolean show){ |
98 |
this.setShowInformationDBTables(new Boolean(show)); |
99 |
} |
100 |
|
101 |
public void setShowInformationDBTables(Boolean show) { |
102 |
this.setDynValue(DYNFIELDNAME_SHOWINFORMATIONDBTABLES, show);
|
103 |
} |
104 |
|
105 |
public Boolean getShowInformationDBTables() { |
106 |
return (Boolean) this.getDynValue(DYNFIELDNAME_SHOWINFORMATIONDBTABLES); |
107 |
} |
108 |
|
109 |
public String getUrl() { |
110 |
return (String) this.getDynValue(DYNFIELDNAME_URL); |
111 |
} |
112 |
|
113 |
public void setUrl(String url) { |
114 |
this.setDynValue(DYNFIELDNAME_URL, url);
|
115 |
} |
116 |
|
117 |
public String getExplorerName() { |
118 |
return JDBCServerExplorer.NAME;
|
119 |
} |
120 |
|
121 |
|
122 |
} |