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 / ResourceOperationStatusId.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 ResourceOperationStatusId implements Serializable {
29
30     private static final long serialVersionUID = -7425019928845751157L;
31
32     @BusinessKey
33     private String serviceId;
34     @BusinessKey
35     private String operationId;
36     @BusinessKey
37     private String resourceTemplateUUID;
38
39     public ResourceOperationStatusId() {
40
41     }
42
43     public ResourceOperationStatusId(String serviceId, String operationId, String resourceTemplateUUID) {
44         this.serviceId = serviceId;
45         this.operationId = operationId;
46         this.resourceTemplateUUID = resourceTemplateUUID;
47     }
48
49     public String getServiceId() {
50         return serviceId;
51     }
52
53     public void setServiceId(String serviceId) {
54         this.serviceId = serviceId;
55     }
56
57     public String getOperationId() {
58         return operationId;
59     }
60
61     public void setOperationId(String operationId) {
62         this.operationId = operationId;
63     }
64
65     public String getResourceTemplateUUID() {
66         return resourceTemplateUUID;
67     }
68
69     public void setResourceTemplateUUID(String resourceTemplateUUID) {
70         this.resourceTemplateUUID = resourceTemplateUUID;
71     }
72
73     @Override
74     public boolean equals(final Object other) {
75         if (this == other) {
76             return true;
77         }
78         if (!(other instanceof ResourceOperationStatusId)) {
79             return false;
80         }
81         ResourceOperationStatusId castOther = (ResourceOperationStatusId) other;
82         return Objects.equals(this.getServiceId(), castOther.getServiceId())
83                 && Objects.equals(this.getOperationId(), castOther.getOperationId())
84                 && Objects.equals(this.getResourceTemplateUUID(), castOther.getResourceTemplateUUID());
85     }
86
87     @Override
88     public int hashCode() {
89         return Objects.hash(this.getServiceId(), this.getOperationId(), this.getResourceTemplateUUID());
90     }
91
92     @Override
93     public String toString() {
94         return new ToStringBuilder(this).append("serviceId", getServiceId()).append("operationId", getOperationId())
95                 .append("resourceTemplateUUID", getResourceTemplateUUID()).toString();
96     }
97
98
99 }