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;
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;
32 import org.apache.commons.lang3.builder.EqualsBuilder;
33 import org.apache.commons.lang3.builder.HashCodeBuilder;
34 import org.apache.commons.lang3.builder.ToStringBuilder;
36 import com.openpojo.business.annotation.BusinessKey;
39 @Table(name = "rainy_day_handler_macro")
40 public class RainyDayHandlerStatus implements Serializable {
45 private static final long serialVersionUID = 1L;
49 @GeneratedValue(strategy = GenerationType.IDENTITY)
53 @Column(name = "FLOW_NAME")
54 private String flowName;
57 @Column(name = "SERVICE_TYPE")
58 private String serviceType;
61 @Column(name = "VNF_TYPE")
62 private String vnfType;
65 @Column(name = "ERROR_CODE")
66 private String errorCode;
69 @Column(name = "WORK_STEP")
70 private String workStep;
73 @Column(name = "POLICY")
74 private String policy;
76 @Column(name = "SECONDARY_POLICY")
77 private String secondaryPolicy;
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();
87 public boolean equals(final Object other) {
88 if (!(other instanceof RainyDayHandlerStatus)) {
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();
98 public int hashCode() {
99 return new HashCodeBuilder().append(flowName).append(serviceType).append(vnfType).append(errorCode)
100 .append(workStep).append(policy).toHashCode();
103 public Integer getId() {
107 public void setId(Integer id) {
111 public String getFlowName() {
115 public void setFlowName(String flowName) {
116 this.flowName = flowName;
119 public String getServiceType() {
123 public void setServiceType(String serviceType) {
124 this.serviceType = serviceType;
127 public String getVnfType() {
131 public void setVnfType(String vnfType) {
132 this.vnfType = vnfType;
135 public String getErrorCode() {
139 public void setErrorCode(String errorCode) {
140 this.errorCode = errorCode;
143 public String getWorkStep() {
147 public void setWorkStep(String workStep) {
148 this.workStep = workStep;
151 public String getPolicy() {
155 public void setPolicy(String policy) {
156 this.policy = policy;
159 public String getSecondaryPolicy() {
160 return secondaryPolicy;
163 public void setSecondaryPolicy(String secondaryPolicy) {
164 this.secondaryPolicy = secondaryPolicy;