001: /*
002: * Hammurapi
003: * Automated Java code review system.
004: * Copyright (C) 2004 Hammurapi Group
005: *
006: * This program is free software; you can redistribute it and/or modify
007: * it under the terms of the GNU General Public License as published by
008: * the Free Software Foundation; either version 2 of the License, or
009: * (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
019: *
020: * URL: http://www.hammurapi.org
021: * e-Mail: support@hammurapi.biz
022: */
023: package org.hammurapi;
024:
025: /**
026: * Defines connection to a Hypersonic server.
027: * @ant.element name="Hypersonic server"
028: * @author Pavel Vlasov
029: * @version $Revision: 1.2 $
030: */
031: public class ServerEntry {
032:
033: private String host = "localhost";
034: private String user = "sa";
035: private String password = "";
036:
037: /**
038: * Host name. Defaults to "localhost"
039: * @param host The host to set.
040: * @ant.non-required
041: */
042: public void setHost(String host) {
043: this .host = host;
044: }
045:
046: /**
047: * Password. Defaults to blank string.
048: * @param password The password to set.
049: * @ant.non-required
050: */
051: public void setPassword(String password) {
052: this .password = password;
053: }
054:
055: /**
056: * User. Defaults to "sa"
057: * @param user The user to set.
058: * @ant.non-required
059: */
060: public void setUser(String user) {
061: this .user = user;
062: }
063:
064: /**
065: * @param host
066: * @param user
067: * @param password
068: */
069: public ServerEntry(String host, String user, String password) {
070: if (host != null) {
071: this .host = host;
072: }
073:
074: if (user != null) {
075: this .user = user;
076: }
077:
078: if (password != null) {
079: this .password = password;
080: }
081: }
082:
083: /**
084: * @return
085: */
086: public String getPassword() {
087: return password;
088: }
089:
090: /**
091: * @return
092: */
093: public String getUser() {
094: return user;
095: }
096:
097: /**
098: * @return
099: */
100: public String getHost() {
101: return host;
102: }
103:
104: }
|