BrightSide Workbench Full Report + Source Code
PollVotePK.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2018 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 package org.turro.elephant.entities.db;
20 
21 import java.io.Serializable;
22 import java.util.Objects;
23 
28 public class PollVotePK implements Serializable {
29 
30  private Long idPoll;
31  private String pollData;
32  private String idContact;
33 
34  public Long getIdPoll() {
35  return idPoll;
36  }
37 
38  public void setIdPoll(Long idPoll) {
39  this.idPoll = idPoll;
40  }
41 
42  public String getPollData() {
43  return pollData;
44  }
45 
46  public void setPollData(String pollData) {
47  this.pollData = pollData;
48  }
49 
50  public String getIdContact() {
51  return idContact;
52  }
53 
54  public void setIdContact(String idContact) {
55  this.idContact = idContact;
56  }
57 
58  @Override
59  public int hashCode() {
60  int hash = 7;
61  hash = 37 * hash + Objects.hashCode(this.idPoll);
62  hash = 37 * hash + Objects.hashCode(this.pollData);
63  hash = 37 * hash + Objects.hashCode(this.idContact);
64  return hash;
65  }
66 
67  @Override
68  public boolean equals(Object obj) {
69  if (this == obj) {
70  return true;
71  }
72  if (obj == null) {
73  return false;
74  }
75  if (getClass() != obj.getClass()) {
76  return false;
77  }
78  final PollVotePK other = (PollVotePK) obj;
79  if (!Objects.equals(this.pollData, other.pollData)) {
80  return false;
81  }
82  if (!Objects.equals(this.idContact, other.idContact)) {
83  return false;
84  }
85  if (!Objects.equals(this.idPoll, other.idPoll)) {
86  return false;
87  }
88  return true;
89  }
90 
91 }