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;
32 import uk.co.blackpepper.bowman.annotation.RemoteResource;
34 @IdClass(ControllerSelectionReferenceId.class)
36 @RemoteResource("/controllerSelectionReference")
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() {
62 public void setVnfType(String vnfType) {
63 this.vnfType = vnfType;
66 public String getControllerName() {
67 return controllerName;
70 public void setControllerName(String controllerName) {
71 this.controllerName = controllerName;
74 public String getActionCategory() {
75 return actionCategory;
78 public void setActionCategory(String actionCategory) {
79 this.actionCategory = actionCategory;
86 public String toString() {
87 return new ToStringBuilder(this).append("vnfType", vnfType).append("controllerName", controllerName)
88 .append("actionCategory", actionCategory).toString();
95 public boolean equals(final Object other) {
96 if (!(other instanceof ControllerSelectionReference)) {
99 ControllerSelectionReference castOther = (ControllerSelectionReference) other;
100 return new EqualsBuilder().append(vnfType, castOther.vnfType).append(controllerName, castOther.controllerName)
101 .append(actionCategory, castOther.actionCategory).isEquals();
108 public int hashCode() {
109 return new HashCodeBuilder().append(vnfType).append(controllerName).append(actionCategory).toHashCode();