dnet-applications/libs/dnet-is-common/src/main/java/eu/dnetlib/is/context/model/ConceptLevel0PK.java

58 lines
1.2 KiB
Java

package eu.dnetlib.is.context.model;
import java.io.Serializable;
import java.util.Objects;
public class ConceptLevel0PK implements Serializable {
private static final long serialVersionUID = -924956037443869537L;
private String id;
private String contextId;
private String categoryId;
public String getId() {
return id;
}
public void setId(final String id) {
this.id = id;
}
public String getContextId() {
return contextId;
}
public void setContextId(final String contextId) {
this.contextId = contextId;
}
public String getCategoryId() {
return categoryId;
}
public void setCategoryId(final String categoryId) {
this.categoryId = categoryId;
}
@Override
public int hashCode() {
return Objects.hash(categoryId, contextId, id);
}
@Override
public boolean equals(final Object obj) {
if (this == obj) { return true; }
if (!(obj instanceof ConceptLevel0PK)) { return false; }
final ConceptLevel0PK other = (ConceptLevel0PK) obj;
return Objects.equals(categoryId, other.categoryId) && Objects.equals(contextId, other.contextId) && Objects.equals(id, other.id);
}
@Override
public String toString() {
return String.format("ConceptLevel0PK [id=%s, contextId=%s, categoryId=%s]", id, contextId, categoryId);
}
}