2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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=========================================================
20 package org.openecomp.mso.requestsdb;
22 import java.io.Serializable;
23 import java.sql.Timestamp;
26 * The service operation status
32 * @version ONAP Amsterdam Release 2017-08-28
34 public class OperationStatus implements Serializable{
39 private static final long serialVersionUID = 1L;
41 private String serviceId = null;
43 private String operationId = null;
45 private String serviceName = null;
47 private String operation = null;
49 private String userId = null;
51 private String result = null;
53 private String operationContent = null;
55 private String progress = "0";
57 private String reason = null;
59 private Timestamp operateAt = null;
61 private Timestamp finishedAt = null;
64 public String getServiceId() {
69 public void setServiceId(String serviceId) {
70 this.serviceId = serviceId;
74 public String getOperationId() {
79 public void setOperationId(String operationId) {
80 this.operationId = operationId;
84 public String getOperation() {
89 public void setOperation(String operation) {
90 this.operation = operation;
94 public String getUserId() {
99 public void setUserId(String userId) {
100 this.userId = userId;
104 public String getResult() {
109 public void setResult(String result) {
110 this.result = result;
114 public String getOperationContent() {
115 return operationContent;
119 public void setOperationContent(String operationContent) {
120 this.operationContent = operationContent;
124 public String getProgress() {
129 public void setProgress(String progress) {
130 this.progress = progress;
134 public String getReason() {
139 public void setReason(String reason) {
140 this.reason = reason;
144 public Timestamp getOperateAt() {
149 public void setOperateAt(Timestamp operateAt) {
150 this.operateAt = operateAt;
154 public Timestamp getFinishedAt() {
159 public void setFinishedAt(Timestamp finishedAt) {
160 this.finishedAt = finishedAt;
166 * @return Returns the serviceName.
168 public String getServiceName() {
175 * @param serviceName The serviceName to set.
177 public void setServiceName(String serviceName) {
178 this.serviceName = serviceName;
186 * @since ONAP Amsterdam Release
189 public int hashCode() {
190 final int prime = 31;
192 result = prime * result + ((operationId == null) ? 0 : operationId.hashCode());
193 result = prime * result + ((serviceId == null) ? 0 : serviceId.hashCode());
203 * @since ONAP Amsterdam Release
206 public boolean equals(Object obj) {
211 if(getClass() != obj.getClass())
213 OperationStatus other = (OperationStatus)obj;
214 if(operationId == null) {
215 if(other.operationId != null)
217 } else if(!operationId.equals(other.operationId))
219 if(serviceId == null) {
220 if(other.serviceId != null)
222 } else if(!serviceId.equals(other.serviceId))