blob: 430518c601c79e6c05f0fc64ff062073cac293b9 [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.JoinColumn;
10import javax.persistence.ManyToOne;
11import javax.persistence.Table;
12
13@Entity
14@Table(name = "journal_pingback", schema = "public", catalog = "mulkcms")
15public class LegacyJournalPingback extends PanacheEntityBase {
16
17 private int id;
18 private String uuid;
19 private long date;
20 private String url;
21 private Boolean spamP;
22 private String submitterIp;
23 private String submitterUserAgent;
24 private LegacyJournalEntry journalEntry;
25
26 @Id
27 @Column(name = "id", nullable = false)
28 public int getId() {
29 return id;
30 }
31
32 public void setId(int id) {
33 this.id = id;
34 }
35
36 @Basic
37 @Column(name = "uuid", nullable = false, length = 36)
38 public String getUuid() {
39 return uuid;
40 }
41
42 public void setUuid(String uuid) {
43 this.uuid = uuid;
44 }
45
46 @Basic
47 @Column(name = "date", nullable = false)
48 public long getDate() {
49 return date;
50 }
51
52 public void setDate(long date) {
53 this.date = date;
54 }
55
56 @Basic
57 @Column(name = "url", nullable = true, length = -1)
58 public String getUrl() {
59 return url;
60 }
61
62 public void setUrl(String url) {
63 this.url = url;
64 }
65
66 @Basic
67 @Column(name = "spam_p", nullable = true)
68 public Boolean getSpamP() {
69 return spamP;
70 }
71
72 public void setSpamP(Boolean spamP) {
73 this.spamP = spamP;
74 }
75
76 @Basic
77 @Column(name = "submitter_ip", nullable = false, length = -1)
78 public String getSubmitterIp() {
79 return submitterIp;
80 }
81
82 public void setSubmitterIp(String submitterIp) {
83 this.submitterIp = submitterIp;
84 }
85
86 @Basic
87 @Column(name = "submitter_user_agent", nullable = false, length = -1)
88 public String getSubmitterUserAgent() {
89 return submitterUserAgent;
90 }
91
92 public void setSubmitterUserAgent(String submitterUserAgent) {
93 this.submitterUserAgent = submitterUserAgent;
94 }
95
96 @Override
97 public boolean equals(Object o) {
98 if (this == o) {
99 return true;
100 }
101 if (o == null || getClass() != o.getClass()) {
102 return false;
103 }
104 LegacyJournalPingback that = (LegacyJournalPingback) o;
105 return id == that.id &&
106 date == that.date &&
107 Objects.equals(uuid, that.uuid) &&
108 Objects.equals(url, that.url) &&
109 Objects.equals(spamP, that.spamP) &&
110 Objects.equals(submitterIp, that.submitterIp) &&
111 Objects.equals(submitterUserAgent, that.submitterUserAgent);
112 }
113
114 @Override
115 public int hashCode() {
116 return Objects.hash(id, uuid, date, url, spamP, submitterIp, submitterUserAgent);
117 }
118
119 @ManyToOne
120 @JoinColumn(name = "entry_id", referencedColumnName = "id", nullable = false)
121 public LegacyJournalEntry getJournalEntry() {
122 return journalEntry;
123 }
124
125 public void setJournalEntry(LegacyJournalEntry journalEntry) {
126 this.journalEntry = journalEntry;
127 }
128}