diff options
Diffstat (limited to 'feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpEntity.java')
-rw-r--r-- | feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpEntity.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpEntity.java b/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpEntity.java index ec1ce579..ed10f4c2 100644 --- a/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpEntity.java +++ b/feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpEntity.java @@ -133,5 +133,25 @@ public class DroolsPdpEntity extends DroolsPdpObject implements Serializable{ public void setDesignatedDate(Date designatedDate) { this.designatedDate = designatedDate; } + + @Override + public boolean equals(Object obj){ + + if (obj instanceof DroolsPdp) { + DroolsPdpEntity d = (DroolsPdpEntity) obj; + return this.pdpId.equals(d.getPdpId()); + } else { + return false; + } + + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + (this.pdpId == null ? 0 : this.pdpId.hashCode()); + return result; + } } |