diff --git a/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/dto/id/dataset/DataSetCodeId.java b/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/dto/id/dataset/DataSetCodeId.java index c5a1ff6170f31d73dd4110b93f3d09d5a52143cd..5a573cb62ea2f57a617f3def433309fa447f1630 100644 --- a/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/dto/id/dataset/DataSetCodeId.java +++ b/openbis_api/source/java/ch/systemsx/cisd/openbis/generic/shared/api/v1/dto/id/dataset/DataSetCodeId.java @@ -69,4 +69,39 @@ public class DataSetCodeId implements IDataSetId return getCode(); } + @Override + public int hashCode() + { + return ((code == null) ? 0 : code.hashCode()); + } + + @Override + public boolean equals(Object obj) + { + if (this == obj) + { + return true; + } + if (obj == null) + { + return false; + } + if (getClass() != obj.getClass()) + { + return false; + } + DataSetCodeId other = (DataSetCodeId) obj; + if (code == null) + { + if (other.code != null) + { + return false; + } + } else if (!code.equals(other.code)) + { + return false; + } + return true; + } + }