Springboot 2.0 upgrade
[so.git] / mso-catalog-db / src / main / java / org / onap / so / db / catalog / beans / macro / RainyDayHandlerStatus.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.catalog.beans.macro;
22
23 import java.io.Serializable;
24
25 import javax.persistence.Column;
26 import javax.persistence.Entity;
27 import javax.persistence.GeneratedValue;
28 import javax.persistence.GenerationType;
29 import javax.persistence.Id;
30 import javax.persistence.Table;
31
32 import org.apache.commons.lang3.builder.EqualsBuilder;
33 import org.apache.commons.lang3.builder.HashCodeBuilder;
34 import org.apache.commons.lang3.builder.ToStringBuilder;
35
36 import com.openpojo.business.annotation.BusinessKey;
37
38 @Entity
39 @Table(name = "rainy_day_handler_macro")
40 public class RainyDayHandlerStatus implements Serializable {
41
42         /**
43          * 
44          */
45         private static final long serialVersionUID = 1L;
46
47         @Id
48         @Column(name = "id")
49         @GeneratedValue(strategy = GenerationType.IDENTITY)
50         private Integer id;
51
52         @BusinessKey
53         @Column(name = "FLOW_NAME")
54         private String flowName;
55
56         @BusinessKey
57         @Column(name = "SERVICE_TYPE")
58         private String serviceType;
59
60         @BusinessKey
61         @Column(name = "VNF_TYPE")
62         private String vnfType;
63
64         @BusinessKey
65         @Column(name = "ERROR_CODE")
66         private String errorCode;
67
68         @BusinessKey
69         @Column(name = "WORK_STEP")
70         private String workStep;
71
72         @BusinessKey
73         @Column(name = "POLICY")
74         private String policy;
75         
76         @Column(name = "SECONDARY_POLICY")
77         private String secondaryPolicy;
78
79         @Override
80         public String toString() {
81                 return new ToStringBuilder(this).append("id", id).append("flowName", flowName)
82                                 .append("serviceType", serviceType).append("vnfType", vnfType).append("errorCode", errorCode)
83                                 .append("workStep", workStep).append("policy", policy).append("secondaryPolicy",secondaryPolicy).toString();
84         }
85
86         @Override
87         public boolean equals(final Object other) {
88                 if (!(other instanceof RainyDayHandlerStatus)) {
89                         return false;
90                 }
91                 RainyDayHandlerStatus castOther = (RainyDayHandlerStatus) other;
92                 return new EqualsBuilder().append(flowName, castOther.flowName).append(serviceType, castOther.serviceType)
93                                 .append(vnfType, castOther.vnfType).append(errorCode, castOther.errorCode)
94                                 .append(workStep, castOther.workStep).append(policy, castOther.policy).isEquals();
95         }
96
97         @Override
98         public int hashCode() {
99                 return new HashCodeBuilder().append(flowName).append(serviceType).append(vnfType).append(errorCode)
100                                 .append(workStep).append(policy).toHashCode();
101         }
102
103         public Integer getId() {
104                 return id;
105         }
106
107         public void setId(Integer id) {
108                 this.id = id;
109         }
110
111         public String getFlowName() {
112                 return flowName;
113         }
114
115         public void setFlowName(String flowName) {
116                 this.flowName = flowName;
117         }
118
119         public String getServiceType() {
120                 return serviceType;
121         }
122
123         public void setServiceType(String serviceType) {
124                 this.serviceType = serviceType;
125         }
126
127         public String getVnfType() {
128                 return vnfType;
129         }
130
131         public void setVnfType(String vnfType) {
132                 this.vnfType = vnfType;
133         }
134
135         public String getErrorCode() {
136                 return errorCode;
137         }
138
139         public void setErrorCode(String errorCode) {
140                 this.errorCode = errorCode;
141         }
142
143         public String getWorkStep() {
144                 return workStep;
145         }
146
147         public void setWorkStep(String workStep) {
148                 this.workStep = workStep;
149         }
150
151         public String getPolicy() {
152                 return policy;
153         }
154
155         public void setPolicy(String policy) {
156                 this.policy = policy;
157         }
158         
159         public String getSecondaryPolicy() {
160                 return secondaryPolicy;
161         }
162         
163         public void setSecondaryPolicy(String secondaryPolicy) {
164                 this.secondaryPolicy = secondaryPolicy;
165         }
166 }