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