49fce7608b48a1f3deba2424d28d67a6be40b315
[so.git] /
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 import javax.persistence.Entity;
25 import javax.persistence.Table;
26 import org.apache.commons.lang3.builder.ToStringBuilder;
27 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
28 import com.fasterxml.jackson.annotation.JsonInclude;
29 import com.fasterxml.jackson.annotation.JsonInclude.Include;
30
31 /**
32  * InfraActiveRequests generated by hbm2java
33  */
34 @JsonIgnoreProperties(ignoreUnknown = true)
35 @Entity
36 @Table(name = "infra_active_requests")
37 @JsonInclude(Include.NON_NULL)
38 public class InfraActiveRequests extends InfraRequests {
39
40     private static final long serialVersionUID = -6818265918910035170L;
41
42     public InfraActiveRequests() {}
43
44     public InfraActiveRequests(final String requestId, final String action) {
45         setRequestId(requestId);
46     }
47
48     public InfraActiveRequests(final String requestId) {
49         setRequestId(requestId);
50     }
51
52     @Override
53     public boolean equals(final Object other) {
54         if (this == other) {
55             return true;
56         }
57         if (!(other instanceof InfraActiveRequests)) {
58             return false;
59         }
60         final InfraActiveRequests castOther = (InfraActiveRequests) other;
61         return Objects.equals(getRequestId(), castOther.getRequestId());
62     }
63
64     @Override
65     public int hashCode() {
66         return Objects.hash(getRequestId());
67     }
68
69     @Override
70     public String toString() {
71         return new ToStringBuilder(this).append("requestId", getRequestId()).append("requestStatus", getRequestStatus())
72                 .append("statusMessage", getStatusMessage()).append("resourceStatusMessage", getResourceStatusMessage())
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("pnfName", getPnfName()).append("serviceType", getServiceType())
76                 .append("tenantId", getTenantId()).append("vnfParams", getVnfParams())
77                 .append("vnfOutputs", getVnfOutputs()).append("requestBody", getRequestBody())
78                 .append("responseBody", getResponseBody()).append("lastModifiedBy", getLastModifiedBy())
79                 .append("modifyTime", getModifyTime()).append("volumeGroupId", getVolumeGroupId())
80                 .append("volumeGroupName", getVolumeGroupName()).append("vfModuleId", getVfModuleId())
81                 .append("vfModuleName", getVfModuleName()).append("vfModuleModelName", getVfModuleModelName())
82                 .append("CloudRegion", getCloudRegion()).append("callBackUrl", getCallBackUrl())
83                 .append("correlator", getCorrelator()).append("serviceInstanceId", getServiceInstanceId())
84                 .append("serviceInstanceName", getServiceInstanceName()).append("requestScope", getRequestScope())
85                 .append("requestAction", getRequestAction()).append("networkId", getNetworkId())
86                 .append("networkName", getNetworkName()).append("networkType", getNetworkType())
87                 .append("requestorId", getRequestorId()).append("configurationId", getConfigurationId())
88                 .append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId())
89                 .append("operationalEnvName", getOperationalEnvName()).append("requestUrl", getRequestUrl())
90                 .append("originalRequestId", getOriginalRequestId())
91                 .append("extSystemErrorSource", getExtSystemErrorSource())
92                 .append("rollbackExtSystemErrorSource", getRollbackExtSystemErrorSource())
93                 .append("tenantName", getTenantName()).append("productFamilyName", getProductFamilyName()).toString();
94     }
95 }