Replaced all tabs with spaces in java and pom.xml
[so.git] / mso-api-handlers / mso-requests-db / src / main / java / org / onap / so / db / request / beans / OperationStatusId.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 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
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
21 package org.onap.so.db.request.beans;
22
23 import java.io.Serializable;
24 import java.util.Objects;
25 import com.openpojo.business.annotation.BusinessKey;
26 import org.apache.commons.lang3.builder.ToStringBuilder;
27
28 public class OperationStatusId implements Serializable {
29
30     private static final long serialVersionUID = 3114959241155882723L;
31
32     @BusinessKey
33     private String serviceId;
34     @BusinessKey
35     private String operationId;
36
37     public OperationStatusId() {
38
39     }
40
41     public OperationStatusId(String serviceId, String operationId) {
42         this.serviceId = serviceId;
43         this.operationId = operationId;
44     }
45
46     public String getServiceId() {
47         return serviceId;
48     }
49
50     public void setServiceId(String serviceId) {
51         this.serviceId = serviceId;
52     }
53
54     public String getOperationId() {
55         return operationId;
56     }
57
58     public void setOperationId(String operationId) {
59         this.operationId = operationId;
60     }
61
62     @Override
63     public boolean equals(final Object other) {
64         if (this == other) {
65             return true;
66         }
67         if (!(other instanceof OperationStatusId)) {
68             return false;
69         }
70         OperationStatusId castOther = (OperationStatusId) other;
71         return Objects.equals(this.getServiceId(), castOther.getServiceId())
72                 && Objects.equals(this.getOperationId(), castOther.getOperationId());
73     }
74
75     @Override
76     public int hashCode() {
77         return Objects.hash(this.getServiceId(), this.getOperationId());
78     }
79
80     @Override
81     public String toString() {
82         return new ToStringBuilder(this).append("serviceId", getServiceId()).append("operationId", getOperationId())
83                 .toString();
84     }
85
86 }