1 package uk.ac.ebi.intenz.domain.history;
2
3 import uk.ac.ebi.intenz.domain.DomainObject;
4
5 import java.util.Date;
6
7
8
9
10
11
12
13
14
15
16 public class Timeout extends DomainObject {
17
18 private int enzymeId;
19 private int timeoutId;
20 private Date startDate;
21 private Date dueDate;
22
23 public Timeout() {
24 enzymeId = 0;
25 timeoutId = 0;
26 startDate = null;
27 dueDate = null;
28 }
29
30 public boolean equals(Object o) {
31 if (this == o) return true;
32 if (!(o instanceof Timeout)) return false;
33 if (!super.equals(o)) return false;
34
35 final Timeout timeout = (Timeout) o;
36
37 if (enzymeId != timeout.enzymeId) return false;
38 if (timeoutId != timeout.timeoutId) return false;
39 if (dueDate != null ? !dueDate.equals(timeout.dueDate) : timeout.dueDate != null) return false;
40 if (startDate != null ? !startDate.equals(timeout.startDate) : timeout.startDate != null) return false;
41
42 return true;
43 }
44
45 public int hashCode() {
46 int result = super.hashCode();
47 result = 29 * result + enzymeId;
48 result = 29 * result + timeoutId;
49 result = 29 * result + (startDate != null ? startDate.hashCode() : 0);
50 result = 29 * result + (dueDate != null ? dueDate.hashCode() : 0);
51 return result;
52 }
53
54 public int getEnzymeId() {
55 return enzymeId;
56 }
57
58 public void setEnzymeId(int enzymeId) {
59 this.enzymeId = enzymeId;
60 }
61
62 public int getTimeoutId() {
63 return timeoutId;
64 }
65
66 public void setTimeoutId(int timeoutId) {
67 this.timeoutId = timeoutId;
68 }
69
70 public Date getStartDate() {
71 return startDate;
72 }
73
74 public void setStartDate(Date startDate) {
75 this.startDate = startDate;
76 }
77
78 public Date getDueDate() {
79 return dueDate;
80 }
81
82 public void setDueDate(Date dueDate) {
83 this.dueDate = dueDate;
84 }
85 }