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;
23 import javax.persistence.Column;
24 import javax.persistence.Entity;
25 import javax.persistence.Id;
26 import javax.persistence.IdClass;
27 import javax.persistence.Table;
28 import com.openpojo.business.annotation.BusinessKey;
29 import org.apache.commons.lang3.builder.ToStringBuilder;
30 import org.apache.commons.lang3.builder.HashCodeBuilder;
31 import org.apache.commons.lang3.builder.EqualsBuilder;
33 @IdClass(ControllerSelectionReferenceId.class)
35 @Table(name = "CONTROLLER_SELECTION_REFERENCE")
36 public class ControllerSelectionReference implements Serializable {
38 private static final long serialVersionUID = -608098800737567188L;
42 @Column(name = "VNF_TYPE")
43 private String vnfType;
47 @Column(name = "CONTROLLER_NAME")
48 private String controllerName;
52 @Column(name = "ACTION_CATEGORY")
53 private String actionCategory;
56 public String getVnfType() {
60 public void setVnfType(String vnfType) {
61 this.vnfType = vnfType;
64 public String getControllerName() {
65 return controllerName;
68 public void setControllerName(String controllerName) {
69 this.controllerName = controllerName;
72 public String getActionCategory() {
73 return actionCategory;
76 public void setActionCategory(String actionCategory) {
77 this.actionCategory = actionCategory;
84 public String toString() {
85 return new ToStringBuilder(this).append("vnfType", vnfType).append("controllerName", controllerName)
86 .append("actionCategory", actionCategory).toString();
93 public boolean equals(final Object other) {
94 if (!(other instanceof ControllerSelectionReference)) {
97 ControllerSelectionReference castOther = (ControllerSelectionReference) other;
98 return new EqualsBuilder().append(vnfType, castOther.vnfType).append(controllerName, castOther.controllerName)
99 .append(actionCategory, castOther.actionCategory).isEquals();
106 public int hashCode() {
107 return new HashCodeBuilder().append(vnfType).append(controllerName).append(actionCategory).toHashCode();