Revision 29406 branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/dal/serverexplorer/db/DBServerExplorerParameters.java

View differences:

DBServerExplorerParameters.java
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
 * 2008 IVER T.I. S.A.   {{Task}}
26
 */
1 27
package org.gvsig.fmap.dal.serverexplorer.db;
2 28

  
3 29
import org.gvsig.fmap.dal.DataServerExplorerParameters;
......
8 34
import org.gvsig.tools.dynobject.DynClass;
9 35
import org.gvsig.tools.dynobject.DynObjectManager;
10 36

  
37
/**
38
 * Abstract class of {@link DataServerExplorerParameters} for Data Base type
39
 * server
40
 *
41
 * @author jmvivo
42
 *
43
 */
11 44
public abstract class DBServerExplorerParameters extends AbstractDataParameters
12 45
		implements DataServerExplorerParameters, DBConnectionParameter {
13 46

  
14 47
    public static final String DYNCLASS_NAME = "DBServerExplorerParameters";
15 48

  
16 49

  
50
    /**
51
	 * Default constructor
52
	 */
17 53
	public DBServerExplorerParameters() {
18 54
		this.delegatedDynObject = (DelegatedDynObject) ToolsLocator
19 55
				.getDynObjectManager()
20 56
				.createDynObject(this.registerDynClass());
21 57
	}
22 58

  
59
	/**
60
	 * Register the DynClass to use
61
	 *
62
	 * @return
63
	 */
23 64
	protected DynClass registerDynClass() {
24 65
	   	DynObjectManager dynman = ToolsLocator.getDynObjectManager();
25 66
    	DynClass dynClass = dynman.get(DYNCLASS_NAME);
......
36 77
	}
37 78

  
38 79

  
80
	/*
81
	 * (non-Javadoc)
82
	 *
83
	 * @see org.gvsig.fmap.dal.resource.db.DBParameters#getHost()
84
	 */
39 85
	public String getHost() {
40 86
		return (String) this.getDynValue(DYNFIELDNAME_HOST);
41 87
	}
42 88

  
89
	/*
90
	 * (non-Javadoc)
91
	 *
92
	 * @see org.gvsig.fmap.dal.resource.db.DBParameters#getPort()
93
	 */
43 94
	public Integer getPort() {
44 95
		return (Integer) this.getDynValue(DYNFIELDNAME_PORT);
45 96
	}
46 97

  
98
	/*
99
	 * (non-Javadoc)
100
	 *
101
	 * @see org.gvsig.fmap.dal.resource.db.DBParameters#getDBName()
102
	 */
47 103
	public String getDBName() {
48 104
		return (String) this.getDynValue(DYNFIELDNAME_DBNAME);
49 105
	}
50 106

  
107
	/*
108
	 * (non-Javadoc)
109
	 *
110
	 * @see org.gvsig.fmap.dal.resource.db.DBParameters#getUser()
111
	 */
51 112
	public String getUser() {
52 113
		return (String) this.getDynValue(DYNFIELDNAME_USER);
53 114
	}
54 115

  
116
	/*
117
	 * (non-Javadoc)
118
	 *
119
	 * @see org.gvsig.fmap.dal.resource.db.DBParameters#getPassword()
120
	 */
55 121
	public String getPassword() {
56 122
		return (String) this.getDynValue(DYNFIELDNAME_PASSWORD);
57 123
	}
58 124

  
125
	/**
126
	 * Set <code>host</code> parameter value
127
	 *
128
	 * @param host
129
	 */
59 130
	public void setHost(String host) {
60 131
		this.setDynValue(DYNFIELDNAME_HOST, host);
61 132
	}
62 133

  
134
	/**
135
	 * Set <code>port/code> parameter value
136
	 *
137
	 * @param port
138
	 */
63 139
	public void setPort(int port) {
64 140
		this.setDynValue(DYNFIELDNAME_PORT, new Integer(port));
65 141
	}
66 142

  
143
	/**
144
	 * Set <code>port/code> parameter value
145
	 *
146
	 * @param port
147
	 */
67 148
	public void setPort(Integer port) {
68 149
		this.setDynValue(DYNFIELDNAME_PORT, port);
69 150
	}
70 151

  
152
	/**
153
	 * Set <code>data base name/code> parameter value
154
	 *
155
	 * @param data
156
	 *            base name
157
	 */
71 158
	public void setDBName(String dbName) {
72 159
		this.setDynValue(DYNFIELDNAME_DBNAME, dbName);
73 160
	}
74 161

  
162
	/**
163
	 * Set <code>user/code> parameter value
164
	 *
165
	 * @param user
166
	 */
75 167
	public void setUser(String user) {
76 168
		this.setDynValue(DYNFIELDNAME_USER, user);
77 169
	}
78 170

  
171
	/**
172
	 * Set <code>password/code> parameter value
173
	 * 
174
	 * @param password
175
	 */
79 176
	public void setPassword(String password) {
80 177
		this.setDynValue(DYNFIELDNAME_PASSWORD, password);
81 178
	}

Also available in: Unified diff