universe@124: package de.uapcore.lightpit.entities; universe@124: universe@124: import java.sql.Timestamp; universe@124: import java.time.Instant; universe@124: import java.util.Objects; universe@124: universe@124: public class IssueComment { universe@124: universe@124: private final Issue issue; universe@124: private final int commentid; universe@124: universe@124: private User author; universe@124: private String comment; universe@124: universe@124: private Timestamp created = Timestamp.from(Instant.now()); universe@124: private Timestamp updated = Timestamp.from(Instant.now()); universe@124: private int updatecount = 0; universe@124: universe@124: universe@124: public IssueComment(int id, Issue issue) { universe@124: this.commentid = id; universe@124: this.issue = issue; universe@124: } universe@124: universe@124: public Issue getIssue() { universe@124: return issue; universe@124: } universe@124: universe@124: public int getId() { universe@124: return commentid; universe@124: } universe@124: universe@124: public User getAuthor() { universe@124: return author; universe@124: } universe@124: universe@124: public void setAuthor(User author) { universe@124: this.author = author; universe@124: } universe@124: universe@124: public String getComment() { universe@124: return comment; universe@124: } universe@124: universe@124: public void setComment(String comment) { universe@124: this.comment = comment; universe@124: } universe@124: universe@124: public Timestamp getCreated() { universe@124: return created; universe@124: } universe@124: universe@124: public void setCreated(Timestamp created) { universe@124: this.created = created; universe@124: } universe@124: universe@124: public Timestamp getUpdated() { universe@124: return updated; universe@124: } universe@124: universe@124: public void setUpdated(Timestamp updated) { universe@124: this.updated = updated; universe@124: } universe@124: universe@124: public int getUpdateCount() { universe@124: return updatecount; universe@124: } universe@124: universe@124: public void setUpdateCount(int updatecount) { universe@124: this.updatecount = updatecount; universe@124: } universe@124: universe@124: @Override universe@124: public boolean equals(Object o) { universe@124: if (this == o) return true; universe@124: if (o == null || getClass() != o.getClass()) return false; universe@124: IssueComment that = (IssueComment) o; universe@124: return commentid == that.commentid; universe@124: } universe@124: universe@124: @Override universe@124: public int hashCode() { universe@124: return Objects.hash(commentid); universe@124: } universe@124: }