2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2021 Bell Canada. 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;
23 import com.fasterxml.jackson.annotation.JsonProperty;
24 import com.openpojo.business.annotation.BusinessKey;
25 import java.io.Serializable;
26 import java.util.Objects;
27 import javax.persistence.Column;
28 import javax.persistence.Entity;
29 import javax.persistence.GeneratedValue;
30 import javax.persistence.GenerationType;
31 import javax.persistence.Id;
32 import javax.persistence.Table;
33 import uk.co.blackpepper.bowman.annotation.RemoteResource;
36 @RemoteResource("/buildingBlockRollback")
37 @Table(name = "building_block_rollback")
38 public class BuildingBlockRollback implements Serializable {
40 private static final long serialVersionUID = 1;
44 @GeneratedValue(strategy = GenerationType.IDENTITY)
45 @Column(name = "ID", nullable = false, updatable = false)
49 @JsonProperty("building_block_name")
50 @Column(name = "BUILDING_BLOCK_NAME", nullable = false, length = 200)
51 private String buildingBlockName;
54 @JsonProperty("action")
55 @Column(name = "ACTION", length = 200)
56 private String action;
59 @JsonProperty("rollback_building_block_name")
60 @Column(name = "ROLLBACK_BUILDING_BLOCK_NAME", nullable = false, length = 200)
61 private String rollbackBuildingBlockName;
64 @JsonProperty("rollback_action")
65 @Column(name = "ROLLBACK_ACTION", length = 200)
66 private String rollbackAction;
68 public Integer getId() {
72 public void setId(Integer id) {
76 public String getBuildingBlockName() {
77 return buildingBlockName;
80 public void setBuildingBlockName(String buildingBlockName) {
81 this.buildingBlockName = buildingBlockName;
84 public String getAction() {
88 public void setAction(String action) {
92 public String getRollbackBuildingBlockName() {
93 return rollbackBuildingBlockName;
96 public void setRollbackBuildingBlockName(String rollbackBuildingBlockName) {
97 this.rollbackBuildingBlockName = rollbackBuildingBlockName;
100 public String getRollbackAction() {
101 return rollbackAction;
104 public void setRollbackAction(String rollbackAction) {
105 this.rollbackAction = rollbackAction;
109 public boolean equals(Object o) {
113 if (o == null || getClass() != o.getClass()) {
116 BuildingBlockRollback that = (BuildingBlockRollback) o;
117 return id.equals(that.id) && buildingBlockName.equals(that.buildingBlockName)
118 && Objects.equals(action, that.action)
119 && rollbackBuildingBlockName.equals(that.rollbackBuildingBlockName)
120 && Objects.equals(rollbackAction, that.rollbackAction);
124 public int hashCode() {
125 return Objects.hash(id, buildingBlockName, action, rollbackBuildingBlockName, rollbackAction);
129 public String toString() {
130 return "BuildingBlockRollback{" + "id='" + id + '\'' + ", buildingBlockName='" + buildingBlockName + '\''
131 + ", action='" + action + '\'' + ", rollbackBuildingBlockName='" + rollbackBuildingBlockName + '\''
132 + ", rollbackAction='" + rollbackAction + '\'' + '}';