ServerEntry.java


Package: org.hammurapi

Results
Date2007/07/27
Codebase445
Reviews717
DPMO251
Sigma4.98

Metrics
NameNumberMinAvgMaxTotal
Class complexity110.0010.0010.0010.00
Code length71.002.2810.0016.00
File length1104.00104.00104.00104.00
Operation complexity71.001.424.0010.00
Work order172.5872.5872.5872.58

Violations
#LineColumnNameSeverityDescription
1231ER-0233Packages should begin with []
2311ER-0492Unify logging strategy - define individual logger for class
33329ER-0303Avoid hardwired string literals
43429ER-0303Avoid hardwired string literals
53533ER-0303Avoid hardwired string literals
64229ER-0823Avoid using method parameter names that conflict with class member names
75133ER-0823Avoid using method parameter names that conflict with class member names
86029ER-0823Avoid using method parameter names that conflict with class member names
9689ER-1093It is good practice to call in any case super() in a constructor. (see also: UnnecessaryConstructorRule )

JavaDoc
ServerEntry

1/*
2 * Hammurapi
3 * Automated Java code review system.
4 * Copyright (C) 2004 Hammurapi Group
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 * URL: http://www.hammurapi.org
21 * e-Mail: support@hammurapi.biz
22 */

23package org.hammurapi;
24
25/**
26 * Defines connection to a Hypersonic server.
27 * @ant.element name="Hypersonic server"
28 * @author Pavel Vlasov
29 * @version $Revision: 1.2 $
30 */

31public class ServerEntry {
32
33 private String host="localhost";
34 private String user="sa";
35 private String password="";
36
37 /**
38 * Host name. Defaults to "localhost"
39 * @param host The host to set.
40 * @ant.non-required
41 */

42 public void setHost(String host) {
43 this.host = host;
44 }
45
46 /**
47 * Password. Defaults to blank string.
48 * @param password The password to set.
49 * @ant.non-required
50 */

51 public void setPassword(String password) {
52 this.password = password;
53 }
54
55 /**
56 * User. Defaults to "sa"
57 * @param user The user to set.
58 * @ant.non-required
59 */

60 public void setUser(String user) {
61 this.user = user;
62 }
63 /**
64 * @param host
65 * @param user
66 * @param password
67 */

68 public ServerEntry(String host, String user, String password) {
69 if (host!=null) {
70 this.host=host;
71 }
72
73 if (user!=null) {
74 this.user=user;
75 }
76
77 if (password!=null) {
78 this.password=password;
79 }
80 }
81
82 /**
83 * @return
84 */

85 public String getPassword() {
86 return password;
87 }
88
89 /**
90 * @return
91 */

92 public String getUser() {
93 return user;
94 }
95
96 /**
97 * @return
98 */

99 public String getHost() {
100 return host;
101 }
102
103}
104
105

Hammurapi 3 Copyright © 2004 Hammurapi Group. All Rights Reserved.