2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.so.db.catalog.beans.macro;
23 import java.io.Serializable;
24 import javax.persistence.Column;
25 import javax.persistence.Entity;
26 import javax.persistence.GeneratedValue;
27 import javax.persistence.GenerationType;
28 import javax.persistence.Id;
29 import javax.persistence.Table;
30 import org.apache.commons.lang3.builder.EqualsBuilder;
31 import org.apache.commons.lang3.builder.HashCodeBuilder;
32 import org.apache.commons.lang3.builder.ToStringBuilder;
33 import com.openpojo.business.annotation.BusinessKey;
36 @Table(name = "rainy_day_handler_macro")
37 public class RainyDayHandlerStatus implements Serializable {
42 private static final long serialVersionUID = 1L;
46 @GeneratedValue(strategy = GenerationType.IDENTITY)
50 @Column(name = "FLOW_NAME")
51 private String flowName;
54 @Column(name = "SERVICE_TYPE")
55 private String serviceType;
58 @Column(name = "VNF_TYPE")
59 private String vnfType;
62 @Column(name = "ERROR_CODE")
63 private String errorCode;
66 @Column(name = "WORK_STEP")
67 private String workStep;
70 @Column(name = "POLICY")
71 private String policy;
73 @Column(name = "SECONDARY_POLICY")
74 private String secondaryPolicy;
77 public String toString() {
78 return new ToStringBuilder(this).append("id", id).append("flowName", flowName)
79 .append("serviceType", serviceType).append("vnfType", vnfType).append("errorCode", errorCode)
80 .append("workStep", workStep).append("policy", policy).append("secondaryPolicy", secondaryPolicy)
85 public boolean equals(final Object other) {
86 if (!(other instanceof RainyDayHandlerStatus)) {
89 RainyDayHandlerStatus castOther = (RainyDayHandlerStatus) other;
90 return new EqualsBuilder().append(flowName, castOther.flowName).append(serviceType, castOther.serviceType)
91 .append(vnfType, castOther.vnfType).append(errorCode, castOther.errorCode)
92 .append(workStep, castOther.workStep).append(policy, castOther.policy).isEquals();
96 public int hashCode() {
97 return new HashCodeBuilder().append(flowName).append(serviceType).append(vnfType).append(errorCode)
98 .append(workStep).append(policy).toHashCode();
101 public Integer getId() {
105 public void setId(Integer id) {
109 public String getFlowName() {
113 public void setFlowName(String flowName) {
114 this.flowName = flowName;
117 public String getServiceType() {
121 public void setServiceType(String serviceType) {
122 this.serviceType = serviceType;
125 public String getVnfType() {
129 public void setVnfType(String vnfType) {
130 this.vnfType = vnfType;
133 public String getErrorCode() {
137 public void setErrorCode(String errorCode) {
138 this.errorCode = errorCode;
141 public String getWorkStep() {
145 public void setWorkStep(String workStep) {
146 this.workStep = workStep;
149 public String getPolicy() {
153 public void setPolicy(String policy) {
154 this.policy = policy;
157 public String getSecondaryPolicy() {
158 return secondaryPolicy;
161 public void setSecondaryPolicy(String secondaryPolicy) {
162 this.secondaryPolicy = secondaryPolicy;