Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
package edu.ncsu.csc.itrust.beans;
import java.io.Serializable;
import java.sql.Timestamp;
public class ApptBean implements Serializable {
/**
*
*/
private static final long serialVersionUID = -1965704529780021183L;
private String apptType;
private int apptID;
private long patient;
private long hcp;
private Timestamp date;
private String comment;
private int price;
/**
* @return the price
*/
public int getPrice() {
return price;
}
/**
* @param price the price to set
*/
public void setPrice(int price) {
this.price = price;
}
/**
* @return the apptType
*/
public String getApptType() {
return apptType;
}
/**
* @param apptID the apptID to set
*/
public void setApptID(int apptID) {
this.apptID = apptID;
}
public int getApptID() {
return apptID;
}
/**
* @param apptType the apptType to set
*/
public void setApptType(String apptType) {
this.apptType = apptType;
}
/**
* @return the patient
*/
public long getPatient() {
return patient;
}
/**
* @param patient the patient to set
*/
public void setPatient(long patient) {
this.patient = patient;
}
/**
* @return the hcp
*/
public long getHcp() {
return hcp;
}
/**
* @param hcp the hcp to set
*/
public void setHcp(long hcp) {
this.hcp = hcp;
}
/**
* @return the date
*/
public Timestamp getDate() {
return (Timestamp) date.clone();
}
/**
* @param date the date to set
*/
public void setDate(Timestamp date) {
this.date = (Timestamp) date.clone();
}
/**
* @return the comment
*/
public String getComment() {
return comment;
}
/**
* @param comment the comment to set
*/
public void setComment(String comment) {
this.comment = comment;
}
@Override
public int hashCode() {
return apptID; // any arbitrary constant will do
}
/**
* Returns true if both id's are equal. Probably needs more advance field by field checking.
*/
@Override public boolean equals(Object other) {
if ( this == other ){
return true;
}
if ( !(other instanceof ApptBean) ){
return false;
}
ApptBean otherAppt = (ApptBean)other;
return otherAppt.getApptID() == getApptID();
}
}