blob: 5bbb0a8730031c637a8d86ef34c8e215e493f263 [file] [log] [blame]
Matthias Andreas Benkard2f0b3702020-01-12 15:46:34 +01001package eu.mulk.entity;
2
3import io.quarkus.hibernate.orm.panache.PanacheEntityBase;
4import java.util.Objects;
5import javax.persistence.Basic;
6import javax.persistence.Column;
7import javax.persistence.Entity;
8import javax.persistence.Id;
9import javax.persistence.IdClass;
10import javax.persistence.Table;
11
12@Entity
13@Table(name = "article_branch_tips", schema = "public", catalog = "mulkcms")
14@IdClass(ArticleBranchTipPK.class)
15public class ArticleBranchTip extends PanacheEntityBase {
16
17 private Integer articleId;
18 private Integer revisionId;
19
20 @Basic
21 @Column(name = "article", nullable = true)
22 @Id
23 public Integer getArticleId() {
24 return articleId;
25 }
26
27 public void setArticleId(Integer articleId) {
28 this.articleId = articleId;
29 }
30
31 @Basic
32 @Column(name = "revision", nullable = true)
33 @Id
34 public Integer getRevisionId() {
35 return revisionId;
36 }
37
38 public void setRevisionId(Integer revision) {
39 this.revisionId = revision;
40 }
41
42 @Override
43 public boolean equals(Object o) {
44 if (this == o) {
45 return true;
46 }
47 if (o == null || getClass() != o.getClass()) {
48 return false;
49 }
50 ArticleBranchTip that = (ArticleBranchTip) o;
51 return Objects.equals(articleId, that.articleId) &&
52 Objects.equals(revisionId, that.revisionId);
53 }
54
55 @Override
56 public int hashCode() {
57 return Objects.hash(articleId, revisionId);
58 }
59}