Format Java code with respect to ONAP Code Style
[externalapi/nbi.git] / src / main / java / org / onap / nbi / apis / serviceorder / model / consumer / OperationStatus.java
1 /**
2  *     Copyright (c) 2018 Vodafone Group
3  *
4  *     Licensed under the Apache License, Version 2.0 (the "License");
5  *     you may not use this file except in compliance with the License.
6  *     You may obtain a copy of the License at
7  *
8  *         http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *     Unless required by applicable law or agreed to in writing, software
11  *     distributed under the License is distributed on an "AS IS" BASIS,
12  *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *     See the License for the specific language governing permissions and
14  *     limitations under the License.
15  */
16
17 package org.onap.nbi.apis.serviceorder.model.consumer;
18
19 import java.io.Serializable;
20 import java.sql.Timestamp;
21
22 public class OperationStatus implements Serializable {
23
24     /**
25      *
26      */
27     private static final long serialVersionUID = 1L;
28
29     private String serviceId = null;
30
31     private String operationId = null;
32
33     private String serviceName = null;
34
35     private String operation = null;
36
37     private String userId = null;
38
39     private String result = null;
40
41     private String operationContent = null;
42
43     private String progress = "0";
44
45     private String reason = null;
46
47     private Timestamp operateAt = null;
48
49     private Timestamp finishedAt = null;
50
51     public String getServiceId() {
52         return serviceId;
53     }
54
55     public void setServiceId(String serviceId) {
56         this.serviceId = serviceId;
57     }
58
59     public String getOperationId() {
60         return operationId;
61     }
62
63     public void setOperationId(String operationId) {
64         this.operationId = operationId;
65     }
66
67     public String getOperation() {
68         return operation;
69     }
70
71     public void setOperation(String operation) {
72         this.operation = operation;
73     }
74
75     public String getUserId() {
76         return userId;
77     }
78
79     public void setUserId(String userId) {
80         this.userId = userId;
81     }
82
83     public String getResult() {
84         return result;
85     }
86
87     public void setResult(String result) {
88         this.result = result;
89     }
90
91     public String getOperationContent() {
92         return operationContent;
93     }
94
95     public void setOperationContent(String operationContent) {
96         this.operationContent = operationContent;
97     }
98
99     public String getProgress() {
100         return progress;
101     }
102
103     public void setProgress(String progress) {
104         this.progress = progress;
105     }
106
107     public String getReason() {
108         return reason;
109     }
110
111     public void setReason(String reason) {
112         this.reason = reason;
113     }
114
115     public Timestamp getOperateAt() {
116         return operateAt;
117     }
118
119     public void setOperateAt(Timestamp operateAt) {
120         this.operateAt = operateAt;
121     }
122
123     public Timestamp getFinishedAt() {
124         return finishedAt;
125     }
126
127     public void setFinishedAt(Timestamp finishedAt) {
128         this.finishedAt = finishedAt;
129     }
130
131     /**
132      * @return Returns the serviceName.
133      */
134     public String getServiceName() {
135         return serviceName;
136     }
137
138     /**
139      * @param serviceName The serviceName to set.
140      */
141     public void setServiceName(String serviceName) {
142         this.serviceName = serviceName;
143     }
144
145     /**
146      * <br>
147      *
148      * @return
149      */
150     @Override
151     public int hashCode() {
152         final int prime = 31;
153         int result = 1;
154         result = prime * result + ((operationId == null) ? 0 : operationId.hashCode());
155         result = prime * result + ((serviceId == null) ? 0 : serviceId.hashCode());
156         return result;
157     }
158
159     /**
160      * <br>
161      *
162      * @param obj
163      * @return
164      */
165     @Override
166     public boolean equals(Object obj) {
167         if (this == obj)
168             return true;
169         if (obj == null)
170             return false;
171         if (getClass() != obj.getClass())
172             return false;
173         OperationStatus other = (OperationStatus) obj;
174         if (operationId == null) {
175             if (other.operationId != null)
176                 return false;
177         } else if (!operationId.equals(other.operationId))
178             return false;
179         if (serviceId == null) {
180             if (other.serviceId != null)
181                 return false;
182         } else if (!serviceId.equals(other.serviceId))
183             return false;
184         return true;
185     }
186
187     @Override
188     public String toString() {
189         return "OperationStatus{" + "serviceId='" + serviceId + '\'' + ", operationId='" + operationId + '\''
190                 + ", serviceName='" + serviceName + '\'' + ", operation='" + operation + '\'' + ", userId='" + userId
191                 + '\'' + ", result='" + result + '\'' + ", operationContent='" + operationContent + '\''
192                 + ", progress='" + progress + '\'' + ", reason='" + reason + '\'' + ", operateAt=" + operateAt
193                 + ", finishedAt=" + finishedAt + '}';
194     }
195 }