49 lines
1.0 KiB
Java
49 lines
1.0 KiB
Java
package eu.dnetlib.openaire.community.db.model;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.Objects;
|
|
|
|
public class CommunityDatasourcePK implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String community;
|
|
|
|
private String dsId;
|
|
|
|
public String getCommunity() {
|
|
return community;
|
|
}
|
|
|
|
public void setCommunity(final String community) {
|
|
this.community = community;
|
|
}
|
|
|
|
public String getDsId() {
|
|
return dsId;
|
|
}
|
|
|
|
public void setDsId(final String dsId) {
|
|
this.dsId = dsId;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(community, dsId);
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(final Object obj) {
|
|
if (this == obj) { return true; }
|
|
if (!(obj instanceof CommunityDatasourcePK)) { return false; }
|
|
final CommunityDatasourcePK other = (CommunityDatasourcePK) obj;
|
|
return Objects.equals(community, other.community) && Objects.equals(dsId, other.dsId);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.format("CommunityDatasourcePK [community=%s, dsId=%s]", community, dsId);
|
|
}
|
|
|
|
}
|