X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdbcapi.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdbcapi%2Fmodel%2FDcaeLocation.java;h=f459c6c3a1c1c82f038b8f225b692a4cbe65cf45;hp=b4b5e2e1d9bcdfe5dcc4074de1e4e57b1c9bb5a7;hb=4b870c6d9272e93c09952cca81f4d11e0653df9b;hpb=4444a934c6ad97d0222abc351af4c392d42f654e diff --git a/src/main/java/org/onap/dmaap/dbcapi/model/DcaeLocation.java b/src/main/java/org/onap/dmaap/dbcapi/model/DcaeLocation.java index b4b5e2e..f459c6c 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/model/DcaeLocation.java +++ b/src/main/java/org/onap/dmaap/dbcapi/model/DcaeLocation.java @@ -22,11 +22,10 @@ package org.onap.dmaap.dbcapi.model; import javax.xml.bind.annotation.XmlRootElement; -import org.apache.log4j.Logger; +import java.util.Objects; @XmlRootElement public class DcaeLocation extends DmaapObject { - static final Logger errorLogger = Logger.getLogger(MR_Cluster.class); private String clli; private String dcaeLayer; private String dcaeLocationName; @@ -100,4 +99,21 @@ public class DcaeLocation extends DmaapObject { this.subnet = subnet; } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DcaeLocation that = (DcaeLocation) o; + return Objects.equals(clli, that.clli) && + Objects.equals(dcaeLayer, that.dcaeLayer) && + Objects.equals(dcaeLocationName, that.dcaeLocationName) && + Objects.equals(openStackAvailabilityZone, that.openStackAvailabilityZone) && + Objects.equals(subnet, that.subnet); + } + + @Override + public int hashCode() { + + return Objects.hash(clli, dcaeLayer, dcaeLocationName, openStackAvailabilityZone, subnet); + } }