2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
20 package org.openecomp.mso.requestsdb;
\r
22 import java.io.Serializable;
\r
25 * The Resource operation status
\r
31 * @version ONAP Amsterdam Release 2017-08-28
\r
33 public class ResourceOperationStatus implements Serializable{
\r
38 private static final long serialVersionUID = 1L;
\r
40 private String serviceId;
\r
42 private String operationId;
\r
44 private String resourceTemplateUUID;
\r
46 private String operType;
\r
48 private String resourceInstanceID;
\r
50 private String jobId;
\r
52 private String status;
\r
54 private String progress = "0";
\r
56 private String errorCode;
\r
58 private String statusDescription;
\r
60 public ResourceOperationStatus(){
\r
64 public ResourceOperationStatus(String serviceId, String operationId, String resourceTemplateUUID)
\r
66 this.serviceId = serviceId;
\r
67 this.operationId = operationId;
\r
68 this.resourceTemplateUUID = resourceTemplateUUID;
\r
71 public String getServiceId() {
\r
76 public void setServiceId(String serviceId) {
\r
77 this.serviceId = serviceId;
\r
81 public String getOperationId() {
\r
86 public void setOperationId(String operationId) {
\r
87 this.operationId = operationId;
\r
91 public String getResourceTemplateUUID() {
\r
92 return resourceTemplateUUID;
\r
96 public void setResourceTemplateUUID(String resourceTemplateUUId) {
\r
97 this.resourceTemplateUUID = resourceTemplateUUId;
\r
101 public String getJobId() {
\r
106 public void setJobId(String jobId) {
\r
107 this.jobId = jobId;
\r
111 public String getStatus() {
\r
116 public void setStatus(String status) {
\r
117 this.status = status;
\r
121 public String getProgress() {
\r
126 public void setProgress(String progress) {
\r
127 this.progress = progress;
\r
131 public String getErrorCode() {
\r
136 public void setErrorCode(String errorCode) {
\r
137 this.errorCode = errorCode;
\r
141 public String getStatusDescription() {
\r
142 return statusDescription;
\r
146 public void setStatusDescription(String statusDescription) {
\r
147 this.statusDescription = statusDescription;
\r
152 public String getResourceInstanceID() {
\r
153 return resourceInstanceID;
\r
158 public void setResourceInstanceID(String resourceInstanceID) {
\r
159 this.resourceInstanceID = resourceInstanceID;
\r
163 public String getOperType() {
\r
168 public void setOperType(String operType) {
\r
169 this.operType = operType;
\r
176 * @since ONAP Amsterdam Release
\r
179 public int hashCode() {
\r
180 final int prime = 31;
\r
182 result = prime * result + ((operationId == null) ? 0 : operationId.hashCode());
\r
183 result = prime * result + ((resourceTemplateUUID == null) ? 0 : resourceTemplateUUID.hashCode());
\r
184 result = prime * result + ((serviceId == null) ? 0 : serviceId.hashCode());
\r
193 * @since ONAP Amsterdam Release
\r
196 public boolean equals(Object obj) {
\r
201 if(getClass() != obj.getClass())
\r
203 ResourceOperationStatus other = (ResourceOperationStatus)obj;
\r
204 if(operationId == null) {
\r
205 if(other.operationId != null)
\r
207 } else if(!operationId.equals(other.operationId))
\r
209 if(resourceTemplateUUID == null) {
\r
210 if(other.resourceTemplateUUID != null)
\r
212 } else if(!resourceTemplateUUID.equals(other.resourceTemplateUUID))
\r
214 if(serviceId == null) {
\r
215 if(other.serviceId != null)
\r
217 } else if(!serviceId.equals(other.serviceId))
\r