dnet-applications/apps/dnet-exporter-api/src/main/java/eu/dnetlib/openaire/community/db/model/CommunityProjectPK.java

48 lines
1.1 KiB
Java
Raw Normal View History

2023-06-12 14:30:42 +02:00
package eu.dnetlib.openaire.community.db.model;
import java.io.Serializable;
import java.util.Objects;
public class CommunityProjectPK implements Serializable {
private static final long serialVersionUID = 1L;
private String community;
private String projectId;
public String getCommunity() {
return community;
}
public void setCommunity(final String community) {
this.community = community;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(final String projectId) {
this.projectId = projectId;
}
@Override
public int hashCode() {
return Objects.hash(community, projectId);
}
@Override
public boolean equals(final Object obj) {
if (this == obj) { return true; }
if (!(obj instanceof CommunityProjectPK)) { return false; }
final CommunityProjectPK other = (CommunityProjectPK) obj;
return Objects.equals(community, other.community) && Objects.equals(projectId, other.projectId);
}
@Override
public String toString() {
return String.format("CommunityProjectPK [community=%s, projectId=%s]", community, projectId);
}
}