1 package uk.ac.ebi.intenz.domain.history;
2
3 import uk.ac.ebi.intenz.domain.constants.Status;
4
5
6
7
8
9
10
11 public class FutureEvent extends HistoryEvent {
12
13 private Status status;
14
15 private Timeout timeout;
16
17
18
19
20 public FutureEvent() {
21 super();
22 status = Status.SUGGESTED;
23 timeout = new Timeout();
24 }
25
26
27
28
29
30
31
32 public boolean equals(Object o) {
33 if (this == o) return true;
34 if (!(o instanceof FutureEvent)) return false;
35 if (!super.equals(o)) return false;
36
37 final FutureEvent event = (FutureEvent) o;
38
39 if (status != null ? !status.equals(event.status) : event.status != null) return false;
40 if (timeout != null ? !timeout.equals(event.timeout) : event.timeout != null) return false;
41
42 return true;
43 }
44
45
46
47
48
49
50 public int hashCode() {
51 int result = super.hashCode();
52 result = 29 * result + (status != null ? status.hashCode() : 0);
53 result = 29 * result + (timeout != null ? timeout.hashCode() : 0);
54 return result;
55 }
56
57
58
59
60
61
62 public Status getStatus() {
63 return status;
64 }
65
66 public void setStatus(Status status) {
67 if (status == null) throw new NullPointerException("Parameter 'status' must not be null.");
68 this.status = status;
69 }
70
71 public Timeout getTimeout() {
72 return timeout;
73 }
74
75 public void setTimeout(Timeout timeout) {
76 if (timeout == null) throw new NullPointerException("Parameter 'timeout' must not be null.");
77 this.timeout = timeout;
78 }
79
80 }