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.Id;
29 import javax.persistence.Table;
31 import org.apache.commons.lang3.builder.EqualsBuilder;
32 import org.apache.commons.lang3.builder.HashCodeBuilder;
33 import org.apache.commons.lang3.builder.ToStringBuilder;
35 import com.openpojo.business.annotation.BusinessKey;
38 @Table(name = "rainy_day_handler_macro")
39 public class RainyDayHandlerStatus implements Serializable {
44 private static final long serialVersionUID = 1L;
52 @Column(name = "FLOW_NAME")
53 private String flowName;
56 @Column(name = "SERVICE_TYPE")
57 private String serviceType;
60 @Column(name = "VNF_TYPE")
61 private String vnfType;
64 @Column(name = "ERROR_CODE")
65 private String errorCode;
68 @Column(name = "WORK_STEP")
69 private String workStep;
72 @Column(name = "POLICY")
73 private String policy;
76 public String toString() {
77 return new ToStringBuilder(this).append("id", id).append("flowName", flowName)
78 .append("serviceType", serviceType).append("vnfType", vnfType).append("errorCode", errorCode)
79 .append("workStep", workStep).append("policy", policy).toString();
83 public boolean equals(final Object other) {
84 if (!(other instanceof RainyDayHandlerStatus)) {
87 RainyDayHandlerStatus castOther = (RainyDayHandlerStatus) other;
88 return new EqualsBuilder().append(flowName, castOther.flowName).append(serviceType, castOther.serviceType)
89 .append(vnfType, castOther.vnfType).append(errorCode, castOther.errorCode)
90 .append(workStep, castOther.workStep).append(policy, castOther.policy).isEquals();
94 public int hashCode() {
95 return new HashCodeBuilder().append(flowName).append(serviceType).append(vnfType).append(errorCode)
96 .append(workStep).append(policy).toHashCode();
99 public Integer getId() {
103 public void setId(Integer id) {
107 public String getFlowName() {
111 public void setFlowName(String flowName) {
112 this.flowName = flowName;
115 public String getServiceType() {
119 public void setServiceType(String serviceType) {
120 this.serviceType = serviceType;
123 public String getVnfType() {
127 public void setVnfType(String vnfType) {
128 this.vnfType = vnfType;
131 public String getErrorCode() {
135 public void setErrorCode(String errorCode) {
136 this.errorCode = errorCode;
139 public String getWorkStep() {
143 public void setWorkStep(String workStep) {
144 this.workStep = workStep;
147 public String getPolicy() {
151 public void setPolicy(String policy) {
152 this.policy = policy;