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

Thu, 15 Oct 2020 18:36:05 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 15 Oct 2020 18:36:05 +0200
changeset 130
7ef369744fd1
parent 124
ed2e7aef2a3e
permissions
-rw-r--r--

adds the possibility to specify path parameters to RequestMapping

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

mercurial