src/main/java/de/uapcore/lightpit/entities/IssueComment.java

changeset 124
ed2e7aef2a3e
equal deleted inserted replaced
123:c27eee1259bd 124:ed2e7aef2a3e
1 package de.uapcore.lightpit.entities;
2
3 import java.sql.Timestamp;
4 import java.time.Instant;
5 import java.util.Objects;
6
7 public class IssueComment {
8
9 private final Issue issue;
10 private final int commentid;
11
12 private User author;
13 private String comment;
14
15 private Timestamp created = Timestamp.from(Instant.now());
16 private Timestamp updated = Timestamp.from(Instant.now());
17 private int updatecount = 0;
18
19
20 public IssueComment(int id, Issue issue) {
21 this.commentid = id;
22 this.issue = issue;
23 }
24
25 public Issue getIssue() {
26 return issue;
27 }
28
29 public int getId() {
30 return commentid;
31 }
32
33 public User getAuthor() {
34 return author;
35 }
36
37 public void setAuthor(User author) {
38 this.author = author;
39 }
40
41 public String getComment() {
42 return comment;
43 }
44
45 public void setComment(String comment) {
46 this.comment = comment;
47 }
48
49 public Timestamp getCreated() {
50 return created;
51 }
52
53 public void setCreated(Timestamp created) {
54 this.created = created;
55 }
56
57 public Timestamp getUpdated() {
58 return updated;
59 }
60
61 public void setUpdated(Timestamp updated) {
62 this.updated = updated;
63 }
64
65 public int getUpdateCount() {
66 return updatecount;
67 }
68
69 public void setUpdateCount(int updatecount) {
70 this.updatecount = updatecount;
71 }
72
73 @Override
74 public boolean equals(Object o) {
75 if (this == o) return true;
76 if (o == null || getClass() != o.getClass()) return false;
77 IssueComment that = (IssueComment) o;
78 return commentid == that.commentid;
79 }
80
81 @Override
82 public int hashCode() {
83 return Objects.hash(commentid);
84 }
85 }

mercurial