Merge "Reorder modifiers"
[so.git] / mso-api-handlers / mso-requests-db / src / main / java / org / openecomp / mso / requestsdb / OperationStatus.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20 package org.openecomp.mso.requestsdb;
21
22 import java.io.Serializable;
23 import java.sql.Timestamp;
24
25 /**
26  * The service operation status 
27  * <br>
28  * <p>
29  * </p>
30  * 
31  * @author
32  * @version     ONAP Amsterdam Release  2017-08-28
33  */
34 public class OperationStatus implements Serializable{
35     
36     /**
37      * 
38      */
39     private static final long serialVersionUID = 1L;
40
41     private String serviceId = null;
42     
43     private String operationId = null;
44     
45     private String serviceName = null;
46     
47     private String operation = null;
48     
49     private String userId = null;
50     
51     private String result = null;
52     
53     private String operationContent = null;
54     
55     private String progress = "0";
56     
57     private String reason = null;
58
59     private Timestamp operateAt = null;
60     
61     private Timestamp finishedAt = null;
62
63     
64     public String getServiceId() {
65         return serviceId;
66     }
67
68     
69     public void setServiceId(String serviceId) {
70         this.serviceId = serviceId;
71     }
72
73     
74     public String getOperationId() {
75         return operationId;
76     }
77
78     
79     public void setOperationId(String operationId) {
80         this.operationId = operationId;
81     }
82
83     
84     public String getOperation() {
85         return operation;
86     }
87
88     
89     public void setOperation(String operation) {
90         this.operation = operation;
91     }
92
93     
94     public String getUserId() {
95         return userId;
96     }
97
98     
99     public void setUserId(String userId) {
100         this.userId = userId;
101     }
102
103     
104     public String getResult() {
105         return result;
106     }
107
108     
109     public void setResult(String result) {
110         this.result = result;
111     }
112
113     
114     public String getOperationContent() {
115         return operationContent;
116     }
117
118     
119     public void setOperationContent(String operationContent) {
120         this.operationContent = operationContent;
121     }
122
123     
124     public String getProgress() {
125         return progress;
126     }
127
128     
129     public void setProgress(String progress) {
130         this.progress = progress;
131     }
132
133     
134     public String getReason() {
135         return reason;
136     }
137
138     
139     public void setReason(String reason) {
140         this.reason = reason;
141     }
142
143     
144     public Timestamp getOperateAt() {
145         return operateAt;
146     }
147
148     
149     public void setOperateAt(Timestamp operateAt) {
150         this.operateAt = operateAt;
151     }
152
153     
154     public Timestamp getFinishedAt() {
155         return finishedAt;
156     }
157
158     
159     public void setFinishedAt(Timestamp finishedAt) {
160         this.finishedAt = finishedAt;
161     }
162
163
164     
165     /**
166      * @return Returns the serviceName.
167      */
168     public String getServiceName() {
169         return serviceName;
170     }
171
172
173     
174     /**
175      * @param serviceName The serviceName to set.
176      */
177     public void setServiceName(String serviceName) {
178         this.serviceName = serviceName;
179     }
180
181
182     /**
183      * <br>
184      * 
185      * @return
186      * @since   ONAP Amsterdam Release 
187      */
188     @Override
189     public int hashCode() {
190         final int prime = 31;
191         int result = 1;
192         result = prime * result + ((operationId == null) ? 0 : operationId.hashCode());
193         result = prime * result + ((serviceId == null) ? 0 : serviceId.hashCode());
194         return result;
195     }
196
197
198     /**
199      * <br>
200      * 
201      * @param obj
202      * @return
203      * @since   ONAP Amsterdam Release 
204      */
205     @Override
206     public boolean equals(Object obj) {
207         if(this == obj)
208             return true;
209         if(obj == null)
210             return false;
211         if(getClass() != obj.getClass())
212             return false;
213         OperationStatus other = (OperationStatus)obj;
214         if(operationId == null) {
215             if(other.operationId != null)
216                 return false;
217         } else if(!operationId.equals(other.operationId))
218             return false;
219         if(serviceId == null) {
220             if(other.serviceId != null)
221                 return false;
222         } else if(!serviceId.equals(other.serviceId))
223             return false;
224         return true;
225     }
226
227
228 }