1
2
3
4
5
6
7 package com.panogenesis.model;
8
9 import java.io.Serializable;
10 import java.util.Date;
11
12 import org.apache.commons.lang.builder.EqualsBuilder;
13 import org.apache.commons.lang.builder.HashCodeBuilder;
14 import org.apache.commons.lang.builder.ToStringBuilder;
15 /***
16 * @author John Arthur
17 *
18 * TODO To change the template for this generated type comment go to
19 * Window - Preferences - Java - Code Style - Code Templates
20 *
21 * @hibernate.class table="issue_history"
22 */
23 public class IssueHistory extends BaseObject implements Serializable {
24
25 private Integer id;
26 private String description;
27 private Integer status;
28 private Date createDate;
29 private Date lastModified;
30 private Integer issueId;
31 private String creatorId;
32
33
34 /***
35 *
36 */
37 public IssueHistory() {
38
39 }
40
41 /***
42 * @return Returns the id.
43 *
44 * @hibernate.id column="id"
45 * generator-class="increment" unsaved-value="null"
46 */
47 public Integer getId() {
48 return id;
49 }
50 /***
51 * @param id The id to set.
52 */
53 public void setId(Integer id) {
54 this.id = id;
55 }
56 /***
57 * @return Returns the description.
58 *
59 * @hibernate.property column="description" not-null="true" length="2000"
60 */
61 public String getDescription() {
62 return description;
63 }
64 /***
65 * @param description The description to set.
66 *
67 * @spring.validator type="required"
68 */
69 public void setDescription(String description) {
70 this.description = description;
71 }
72 /***
73 * @return Returns the status.
74 *
75 * @hibernate.property column="status"
76 */
77 public Integer getStatus() {
78 return status;
79 }
80 /***
81 * @param status The status to set.
82 */
83 public void setStatus(Integer status) {
84 this.status = status;
85 }
86 /***
87 * @return Returns the issueId.
88 *
89 * @hibernate.property column="issue_id"
90 */
91 public Integer getIssueId() {
92 return issueId;
93 }
94 /***
95 * @param issueId The issueId to set.
96 */
97 public void setIssueId(Integer issueId) {
98 this.issueId = issueId;
99 }
100
101 /***
102 * @return Returns the createDate.
103 *
104 * @hibernate.property column="create_date"
105 */
106 public Date getCreateDate() {
107 return createDate;
108 }
109 /***
110 * @param createDate The createDate to set.
111 */
112 public void setCreateDate(Date createDate) {
113 this.createDate = createDate;
114 }
115 /***
116 * @return Returns the lastModified.
117 *
118 * @hibernate.property column="last_modified"
119 */
120 public Date getLastModified() {
121 return lastModified;
122 }
123 /***
124 * @param lastModified The lastModified to set.
125 */
126 public void setLastModified(Date lastModified) {
127 this.lastModified = lastModified;
128 }
129
130 /***
131 * @return Returns the creatorId.
132 *
133 * @hibernate.property column="creator_id" not-null="true" length="50"
134 */
135 public String getCreatorId() {
136 return creatorId;
137 }
138 /***
139 * @param creatorId The creatorId to set.
140 */
141 public void setCreatorId(String userId) {
142 this.creatorId = userId;
143 }
144 /***
145 * @see java.lang.Object#equals(Object)
146 */
147 public boolean equals(Object object) {
148 if (!(object instanceof IssueHistory)) {
149 return false;
150 }
151 IssueHistory rhs = (IssueHistory) object;
152 return new EqualsBuilder().append(
153 this.creatorId, rhs.creatorId).append(this.description,
154 rhs.description).append(this.lastModified, rhs.lastModified)
155 .append(this.issueId, rhs.issueId).append(this.createDate,
156 rhs.createDate).append(this.status, rhs.status).append(
157 this.id, rhs.id).isEquals();
158 }
159 /***
160 * @see java.lang.Object#hashCode()
161 */
162 public int hashCode() {
163 return new HashCodeBuilder(2096867543, 1078622163).append(this.creatorId).append(this.description)
164 .append(this.lastModified).append(this.issueId).append(
165 this.createDate).append(this.status).append(this.id)
166 .toHashCode();
167 }
168 /***
169 * @see java.lang.Object#toString()
170 */
171 public String toString() {
172 return new ToStringBuilder(this)
173 .append("description", this.description).append("id", this.id)
174 .append("status", this.status).append("issueId", this.issueId)
175 .append("lastModified", this.lastModified).append("creatorId",
176 this.creatorId).append("createDate", this.createDate)
177 .toString();
178 }
179 }