Matthias Andreas Benkard | 734879e | 2020-01-24 10:47:37 +0100 | [diff] [blame^] | 1 | package eu.mulk.mulkcms2.benki; |
| 2 | |
| 3 | import javax.persistence.Basic; |
| 4 | import javax.persistence.Column; |
| 5 | import javax.persistence.Entity; |
| 6 | import javax.persistence.Table; |
| 7 | |
| 8 | @Entity |
| 9 | @Table(name = "user_visible_lazychat_messages", schema = "public", catalog = "benki") |
| 10 | public class UserVisibleLazychatMessage { |
| 11 | |
| 12 | private Integer userId; |
| 13 | private Integer messageId; |
| 14 | |
| 15 | @Basic |
| 16 | @Column(name = "user", nullable = true) |
| 17 | public Integer getUserId() { |
| 18 | return userId; |
| 19 | } |
| 20 | |
| 21 | public void setUserId(Integer userId) { |
| 22 | this.userId = userId; |
| 23 | } |
| 24 | |
| 25 | @Basic |
| 26 | @Column(name = "message", nullable = true) |
| 27 | public Integer getMessageId() { |
| 28 | return messageId; |
| 29 | } |
| 30 | |
| 31 | public void setMessageId(Integer messageId) { |
| 32 | this.messageId = messageId; |
| 33 | } |
| 34 | |
| 35 | @Override |
| 36 | public boolean equals(Object o) { |
| 37 | if (this == o) { |
| 38 | return true; |
| 39 | } |
| 40 | if (o == null || getClass() != o.getClass()) { |
| 41 | return false; |
| 42 | } |
| 43 | |
| 44 | UserVisibleLazychatMessage that = (UserVisibleLazychatMessage) o; |
| 45 | |
| 46 | if (userId != null ? !userId.equals(that.userId) : that.userId != null) { |
| 47 | return false; |
| 48 | } |
| 49 | if (messageId != null ? !messageId.equals(that.messageId) : that.messageId != null) { |
| 50 | return false; |
| 51 | } |
| 52 | |
| 53 | return true; |
| 54 | } |
| 55 | |
| 56 | @Override |
| 57 | public int hashCode() { |
| 58 | int result = userId != null ? userId.hashCode() : 0; |
| 59 | result = 31 * result + (messageId != null ? messageId.hashCode() : 0); |
| 60 | return result; |
| 61 | } |
| 62 | } |