[SO] Release so 1.13.0 image
[so.git] / mso-catalog-db / src / main / java / org / onap / so / db / catalog / beans / ControllerSelectionReferenceId.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 - 2018 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
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
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=========================================================
19  */
20
21 package org.onap.so.db.catalog.beans;
22
23 import java.io.Serializable;
24 import com.openpojo.business.annotation.BusinessKey;
25 import org.apache.commons.lang3.builder.ToStringBuilder;
26 import org.apache.commons.lang3.builder.HashCodeBuilder;
27 import org.apache.commons.lang3.builder.EqualsBuilder;
28
29
30 public class ControllerSelectionReferenceId implements Serializable {
31
32     private static final long serialVersionUID = 1L;
33     @BusinessKey
34     private String vnfType;
35     @BusinessKey
36     private String controllerName;
37     @BusinessKey
38     private String actionCategory;
39
40
41     @Override
42     public boolean equals(final Object other) {
43         if (!(other instanceof ControllerSelectionReferenceId)) {
44             return false;
45         }
46         ControllerSelectionReferenceId castOther = (ControllerSelectionReferenceId) other;
47         return new EqualsBuilder().append(vnfType, castOther.vnfType).append(controllerName, castOther.controllerName)
48                 .append(actionCategory, castOther.actionCategory).isEquals();
49     }
50
51     @Override
52     public int hashCode() {
53         return new HashCodeBuilder().append(vnfType).append(controllerName).append(actionCategory).toHashCode();
54     }
55
56     @Override
57     public String toString() {
58         return new ToStringBuilder(this).append("vnfType", vnfType).append("controllerName", controllerName)
59                 .append("actionCategory", actionCategory).toString();
60     }
61
62     public String getVnfType() {
63         return vnfType;
64     }
65
66     public void setVnfType(String vnfType) {
67         this.vnfType = vnfType;
68     }
69
70     public String getControllerName() {
71         return controllerName;
72     }
73
74     public void setControllerName(String controllerName) {
75         this.controllerName = controllerName;
76     }
77
78     public String getActionCategory() {
79         return actionCategory;
80     }
81
82     public void setActionCategory(String actionCategory) {
83         this.actionCategory = actionCategory;
84     }
85
86
87 }