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

69 lines
1.6 KiB
Java

package eu.dnetlib.is.context.model;
import java.io.Serializable;
import java.util.Objects;
public class ConceptLevel1PK implements Serializable {
private static final long serialVersionUID = -7993480292203819163L;
private String id;
private String contextId;
private String categoryId;
private String conceptLevel0Id;
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;
}
public String getConceptLevel0Id() {
return conceptLevel0Id;
}
public void setConceptLevel0Id(final String conceptLevel0Id) {
this.conceptLevel0Id = conceptLevel0Id;
}
@Override
public int hashCode() {
return Objects.hash(categoryId, conceptLevel0Id, contextId, id);
}
@Override
public boolean equals(final Object obj) {
if (this == obj) { return true; }
if (!(obj instanceof ConceptLevel1PK)) { return false; }
final ConceptLevel1PK other = (ConceptLevel1PK) obj;
return Objects.equals(categoryId, other.categoryId) && Objects.equals(conceptLevel0Id, other.conceptLevel0Id)
&& Objects.equals(contextId, other.contextId) && Objects.equals(id, other.id);
}
@Override
public String toString() {
return String.format("ConceptLevel1PK [id=%s, contextId=%s, categoryId=%s, conceptLevel0Id=%s]", id, contextId, categoryId, conceptLevel0Id);
}
}