X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=models-interactions%2Fmodel-impl%2Fsdnr%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fsdnr%2FPciRequest.java;h=03fdfc1e408a23a24cf128c88320b832a563d89a;hb=9b3ff5f270572a6760ff07dda9577cdadb53b088;hp=d1430a7dcc1e43aa4eaea3babc7496bee066e343;hpb=3000fdca611c32b7001c553621660b8ea0d2eb49;p=policy%2Fmodels.git diff --git a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequest.java b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequest.java index d1430a7dc..03fdfc1e4 100644 --- a/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequest.java +++ b/models-interactions/model-impl/sdnr/src/main/java/org/onap/policy/sdnr/PciRequest.java @@ -4,7 +4,7 @@ * ================================================================================ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved. * Modifications Copyright (C) 2019 Nordix Foundation. - * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,11 +25,13 @@ package org.onap.policy.sdnr; import com.google.gson.annotations.SerializedName; import java.io.Serializable; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @Getter @Setter +@EqualsAndHashCode public class PciRequest implements Serializable { private static final long serialVersionUID = 323235565922846624L; @@ -99,47 +101,4 @@ public class PciRequest implements Serializable { public String toString() { return "PciRequest[commonHeader=" + commonHeader + ", action=" + action + ", payload=" + payload + "]"; } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((commonHeader == null) ? 0 : commonHeader.hashCode()); - result = prime * result + ((action == null) ? 0 : action.hashCode()); - result = prime * result + ((payload == null) ? 0 : payload.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - PciRequest other = (PciRequest) obj; - if (commonHeader == null) { - if (other.commonHeader != null) { - return false; - } - } else if (!commonHeader.equals(other.commonHeader)) { - return false; - } - if (action == null) { - if (other.action != null) { - return false; - } - } else if (!action.equals(other.action)) { - return false; - } - if (payload == null) { - return other.payload == null; - } else { - return payload.equals(other.payload); - } - } }