1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.itracker.model;
20
21 import org.apache.commons.lang.builder.ToStringBuilder;
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 public class IssueActivity extends AbstractEntity {
37
38
39
40
41 private static final long serialVersionUID = 1L;
42
43
44
45
46 private Issue issue;
47
48
49
50
51 private User user;
52
53
54
55
56 private String description = "";
57
58
59
60
61 private boolean notificationSent = false;
62
63 private IssueActivityType activityType = IssueActivityType.ISSUE_CREATED;
64
65
66
67
68
69
70
71
72
73
74
75 public IssueActivity() {
76
77 }
78
79
80
81
82
83
84 public IssueActivity(Issue issue, User user, IssueActivityType type) {
85 setIssue(issue);
86 setUser(user);
87 setActivityType(type);
88 }
89
90 public Issue getIssue() {
91 return issue;
92 }
93
94 public void setIssue(Issue issue) {
95 if (issue == null) {
96 throw new IllegalArgumentException("null issue");
97 }
98 this.issue = issue;
99 }
100
101 public User getUser() {
102 return user;
103 }
104
105 public void setUser(User user) {
106 if (user == null) {
107 throw new IllegalArgumentException("null user");
108 }
109 this.user = user;
110 }
111
112 public void setActivityType(IssueActivityType type) {
113
114
115 this.activityType = type;
116 }
117
118 public IssueActivityType getActivityType() {
119 return this.activityType;
120 }
121
122 public String getDescription() {
123 return description;
124 }
125
126 public void setDescription(String description) {
127 this.description = description;
128 }
129
130 public boolean getNotificationSent() {
131 return notificationSent;
132 }
133
134 public void setNotificationSent(boolean sent) {
135 this.notificationSent = sent;
136 }
137
138 public String toString() {
139 return new ToStringBuilder(this).append("id", getId())
140 .append("issue", getIssue()).append("user", getUser()).append("type",
141 getActivityType()).append("createDate", getCreateDate())
142 .toString();
143
144 }
145
146 }