X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdbcapi%2Fmodel%2FDcaeLocation.java;h=f459c6c3a1c1c82f038b8f225b692a4cbe65cf45;hb=HEAD;hp=8248ef11580504a3c5f0e03d339f4a8f1704fc73;hpb=a05efb7b7b3cfc77f5e3fda11e8434834829f56a;p=dmaap%2Fdbcapi.git 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 8248ef1..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 logger = 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); + } }