Containerization feature of SO
[so.git] / mso-api-handlers / mso-requests-db / src / main / java / org / onap / so / db / request / beans / InfraActiveRequests.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.util.Objects;
24
25 import javax.persistence.Entity;
26 import javax.persistence.Table;
27
28 import org.apache.commons.lang3.builder.ToStringBuilder;
29
30 /**
31  * InfraActiveRequests generated by hbm2java
32  */
33 @Entity
34 @Table(name = "infra_active_requests")
35 public class InfraActiveRequests extends InfraRequests {
36
37         private static final long serialVersionUID = -6818265918910035170L;
38
39         public InfraActiveRequests() {
40         }
41
42         public InfraActiveRequests(String requestId, String action) {
43                 setRequestId(requestId);
44                 setAction(action);
45         }
46
47         public InfraActiveRequests(String requestId) {
48                 setRequestId(requestId);
49         }    
50         
51         @Override
52         public boolean equals(final Object other) {
53                 if (this == other) {
54                         return true;
55                 }
56                 if (!(other instanceof InfraActiveRequests)) {
57                         return false;
58                 }
59                 InfraActiveRequests castOther = (InfraActiveRequests) other;
60                 return Objects.equals(getRequestId(), castOther.getRequestId());
61         }
62
63         @Override
64         public int hashCode() {
65                 return Objects.hash(getRequestId());
66         }
67
68         @Override
69         public String toString() {
70                 return new ToStringBuilder(this).append("requestId", getRequestId())
71                                 .append("clientRequestId", getClientRequestId()).append("action", getAction())
72                                 .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage())
73                                 .append("progress", getProgress()).append("startTime", getStartTime()).append("endTime", getEndTime())
74                                 .append("source", getSource()).append("vnfId", getVnfId()).append("vnfName", getVnfName())
75                                 .append("vnfType", getVnfType()).append("serviceType", getServiceType())
76                                 .append("aicNodeClli", getAicNodeClli()).append("tenantId", getTenantId())
77                                 .append("provStatus", getProvStatus()).append("vnfParams", getVnfParams())
78                                 .append("vnfOutputs", getVnfOutputs()).append("requestBody", getRequestBody())
79                                 .append("responseBody", getResponseBody()).append("lastModifiedBy", getLastModifiedBy())
80                                 .append("modifyTime", getModifyTime()).append("requestType", getRequestType())
81                                 .append("volumeGroupId", getVolumeGroupId()).append("volumeGroupName", getVolumeGroupName())
82                                 .append("vfModuleId", getVfModuleId()).append("vfModuleName", getVfModuleName())
83                                 .append("vfModuleModelName", getVfModuleModelName()).append("aaiServiceId", getAaiServiceId())
84                                 .append("aicCloudRegion", getAicCloudRegion()).append("callBackUrl", getCallBackUrl())
85                                 .append("correlator", getCorrelator()).append("serviceInstanceId", getServiceInstanceId())
86                                 .append("serviceInstanceName", getServiceInstanceName()).append("requestScope", getRequestScope())
87                                 .append("requestAction", getRequestAction()).append("networkId", getNetworkId())
88                                 .append("networkName", getNetworkName()).append("networkType", getNetworkType())
89                                 .append("requestorId", getRequestorId()).append("configurationId", getConfigurationId())
90                                 .append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId())
91                                 .append("operationalEnvName", getOperationalEnvName()).toString();
92         }
93 }