1
|
package eu.dnetlib.organizations.model;
|
2
|
|
3
|
import java.io.Serializable;
|
4
|
import java.util.Objects;
|
5
|
|
6
|
public class UserCountryPK implements Serializable {
|
7
|
|
8
|
/**
|
9
|
*
|
10
|
*/
|
11
|
private static final long serialVersionUID = 2003686130380208901L;
|
12
|
|
13
|
private String email;
|
14
|
|
15
|
private String country;
|
16
|
|
17
|
public String getEmail() {
|
18
|
return email;
|
19
|
}
|
20
|
|
21
|
public void setEmail(final String email) {
|
22
|
this.email = email;
|
23
|
}
|
24
|
|
25
|
public String getCountry() {
|
26
|
return country;
|
27
|
}
|
28
|
|
29
|
public void setCountry(final String country) {
|
30
|
this.country = country;
|
31
|
}
|
32
|
|
33
|
@Override
|
34
|
public int hashCode() {
|
35
|
return Objects.hash(country, email);
|
36
|
}
|
37
|
|
38
|
@Override
|
39
|
public boolean equals(final Object obj) {
|
40
|
if (this == obj) { return true; }
|
41
|
if (obj == null) { return false; }
|
42
|
if (!(obj instanceof UserCountryPK)) { return false; }
|
43
|
final UserCountryPK other = (UserCountryPK) obj;
|
44
|
return Objects.equals(country, other.country) && Objects.equals(email, other.email);
|
45
|
}
|
46
|
|
47
|
@Override
|
48
|
public String toString() {
|
49
|
return String.format("UserCountryPK [email=%s, country=%s]", email, country);
|
50
|
}
|
51
|
|
52
|
}
|