2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.be.components.upgrade;
23 import org.openecomp.sdc.be.dao.api.ActionStatus;
25 public class ServiceInfo {
26 private String uniqueId;
27 private String version;
29 private ActionStatus status;
32 status = ActionStatus.OK;
35 public ServiceInfo(String id, ActionStatus status){
39 public String getUniqueId() {
42 public void setUniqueId(String uniqueId) {
43 this.uniqueId = uniqueId;
45 public String getVersion() {
48 public void setVersion(String version) {
49 this.version = version;
51 public String getName() {
54 public void setName(String name) {
57 public ActionStatus getStatus() {
60 public void setStatus(ActionStatus status) {
65 public int hashCode() {
68 result = prime * result + ((name == null) ? 0 : name.hashCode());
69 result = prime * result + ((status == null) ? 0 : status.hashCode());
70 result = prime * result + ((uniqueId == null) ? 0 : uniqueId.hashCode());
71 result = prime * result + ((version == null) ? 0 : version.hashCode());
76 public boolean equals(Object obj) {
81 if (getClass() != obj.getClass())
83 ServiceInfo other = (ServiceInfo) obj;
85 if (other.name != null)
87 } else if (!name.equals(other.name))
89 if (status != other.status)
91 if (uniqueId == null) {
92 if (other.uniqueId != null)
94 } else if (!uniqueId.equals(other.uniqueId))
96 if (version == null) {
97 if (other.version != null)
99 } else if (!version.equals(other.version))