aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/dmaap/dbcapi/model/DcaeLocation.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/dmaap/dbcapi/model/DcaeLocation.java')
-rw-r--r--src/main/java/org/onap/dmaap/dbcapi/model/DcaeLocation.java20
1 files changed, 18 insertions, 2 deletions
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);
+ }
}