1 package org.onap.so.db.catalog.beans;
3 * ============LICENSE_START=======================================================
5 * ================================================================================
6 * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 import java.io.Serializable;
24 import javax.persistence.Column;
25 import javax.persistence.Entity;
26 import javax.persistence.Id;
27 import javax.persistence.IdClass;
28 import javax.persistence.Table;
30 import com.openpojo.business.annotation.BusinessKey;
31 import org.apache.commons.lang3.builder.ToStringBuilder;
32 import org.apache.commons.lang3.builder.HashCodeBuilder;
33 import org.apache.commons.lang3.builder.EqualsBuilder;
35 @IdClass(ControllerSelectionReferenceId.class)
37 @Table(name = "CONTROLLER_SELECTION_REFERENCE")
38 public class ControllerSelectionReference implements Serializable {
40 private static final long serialVersionUID = -608098800737567188L;
44 @Column(name = "VNF_TYPE")
45 private String vnfType;
49 @Column(name = "CONTROLLER_NAME")
50 private String controllerName;
54 @Column(name = "ACTION_CATEGORY")
55 private String actionCategory;
58 public String getVnfType() {
61 public void setVnfType(String vnfType) {
62 this.vnfType = vnfType;
64 public String getControllerName() {
65 return controllerName;
67 public void setControllerName(String controllerName) {
68 this.controllerName = controllerName;
70 public String getActionCategory() {
71 return actionCategory;
73 public void setActionCategory(String actionCategory) {
74 this.actionCategory = actionCategory;
81 public String toString() {
82 return new ToStringBuilder(this).append("vnfType", vnfType).append("controllerName", controllerName)
83 .append("actionCategory", actionCategory).toString();
90 public boolean equals(final Object other) {
91 if (!(other instanceof ControllerSelectionReference)) {
94 ControllerSelectionReference castOther = (ControllerSelectionReference) other;
95 return new EqualsBuilder().append(vnfType, castOther.vnfType).append(controllerName, castOther.controllerName)
96 .append(actionCategory, castOther.actionCategory).isEquals();
103 public int hashCode() {
104 return new HashCodeBuilder().append(vnfType).append(controllerName).append(actionCategory).toHashCode();