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

     1 package de.uapcore.lightpit.entities;
     3 import java.sql.Timestamp;
     4 import java.time.Instant;
     5 import java.util.Objects;
     7 public class IssueComment {
     9     private final Issue issue;
    10     private final int commentid;
    12     private User author;
    13     private String comment;
    15     private Timestamp created = Timestamp.from(Instant.now());
    16     private Timestamp updated = Timestamp.from(Instant.now());
    17     private int updatecount = 0;
    20     public IssueComment(int id, Issue issue) {
    21         this.commentid = id;
    22         this.issue = issue;
    23     }
    25     public Issue getIssue() {
    26         return issue;
    27     }
    29     public int getId() {
    30         return commentid;
    31     }
    33     public User getAuthor() {
    34         return author;
    35     }
    37     public void setAuthor(User author) {
    38         this.author = author;
    39     }
    41     public String getComment() {
    42         return comment;
    43     }
    45     public void setComment(String comment) {
    46         this.comment = comment;
    47     }
    49     public Timestamp getCreated() {
    50         return created;
    51     }
    53     public void setCreated(Timestamp created) {
    54         this.created = created;
    55     }
    57     public Timestamp getUpdated() {
    58         return updated;
    59     }
    61     public void setUpdated(Timestamp updated) {
    62         this.updated = updated;
    63     }
    65     public int getUpdateCount() {
    66         return updatecount;
    67     }
    69     public void setUpdateCount(int updatecount) {
    70         this.updatecount = updatecount;
    71     }
    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     }
    81     @Override
    82     public int hashCode() {
    83         return Objects.hash(commentid);
    84     }
    85 }

mercurial