diff options
Diffstat (limited to 'models-interactions/model-impl/so/src')
-rw-r--r-- | models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java | 78 | ||||
-rw-r--r-- | models-interactions/model-impl/so/src/test/resources/logback-test.xml | 38 |
2 files changed, 41 insertions, 75 deletions
diff --git a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java index 3fa3332b3..9c3a4ec33 100644 --- a/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java +++ b/models-interactions/model-impl/so/src/main/java/org/onap/policy/so/SoRequestDetails.java @@ -4,6 +4,7 @@ * ================================================================================ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 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 +26,13 @@ import java.io.Serializable; import java.util.LinkedList; import java.util.List; import java.util.Map; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @Getter @Setter +@EqualsAndHashCode public class SoRequestDetails implements Serializable { private static final long serialVersionUID = -3283942659786236032L; @@ -60,81 +63,6 @@ public class SoRequestDetails implements Serializable { } @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - SoRequestDetails other = (SoRequestDetails) obj; - if (cloudConfiguration == null) { - if (other.cloudConfiguration != null) { - return false; - } - } else if (!cloudConfiguration.equals(other.cloudConfiguration)) { - return false; - } - if (configurationParameters == null) { - if (other.configurationParameters != null) { - return false; - } - } else if (!configurationParameters.equals(other.configurationParameters)) { - return false; - } - if (modelInfo == null) { - if (other.modelInfo != null) { - return false; - } - } else if (!modelInfo.equals(other.modelInfo)) { - return false; - } - if (relatedInstanceList == null) { - if (other.relatedInstanceList != null) { - return false; - } - } else if (!relatedInstanceList.equals(other.relatedInstanceList)) { - return false; - } - if (requestInfo == null) { - if (other.requestInfo != null) { - return false; - } - } else if (!requestInfo.equals(other.requestInfo)) { - return false; - } - if (requestParameters == null) { - if (other.requestParameters != null) { - return false; - } - } else if (!requestParameters.equals(other.requestParameters)) { - return false; - } - if (subscriberInfo == null) { - return other.subscriberInfo == null; - } else { - return subscriberInfo.equals(other.subscriberInfo); - } - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((cloudConfiguration == null) ? 0 : cloudConfiguration.hashCode()); - result = prime * result + ((configurationParameters == null) ? 0 : configurationParameters.hashCode()); - result = prime * result + ((modelInfo == null) ? 0 : modelInfo.hashCode()); - result = prime * result + ((relatedInstanceList == null) ? 0 : relatedInstanceList.hashCode()); - result = prime * result + ((requestInfo == null) ? 0 : requestInfo.hashCode()); - result = prime * result + ((requestParameters == null) ? 0 : requestParameters.hashCode()); - result = prime * result + ((subscriberInfo == null) ? 0 : subscriberInfo.hashCode()); - return result; - } - - @Override public String toString() { return "SORequestDetails [modelInfo=" + modelInfo + ", cloudConfiguration=" + cloudConfiguration + ", requestInfo=" + requestInfo + ", subscriberInfo=" + subscriberInfo diff --git a/models-interactions/model-impl/so/src/test/resources/logback-test.xml b/models-interactions/model-impl/so/src/test/resources/logback-test.xml new file mode 100644 index 000000000..855706304 --- /dev/null +++ b/models-interactions/model-impl/so/src/test/resources/logback-test.xml @@ -0,0 +1,38 @@ +<!-- + ============LICENSE_START======================================================= + ONAP + ================================================================================ + Copyright (C) 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ============LICENSE_END========================================================= +--> + +<configuration scan="true" scanPeriod="60 seconds" debug="false"> + + <contextName>ModelImplSo</contextName> + <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /> + <property name="LOG_DIR" value="${java.io.tmpdir}/pf_logging/" /> + + <!-- USE FOR STD OUT ONLY --> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern> + </encoder> + </appender> + + <root level="warn"> + <appender-ref ref="STDOUT" /> + </root> + +</configuration> |