[SO] Release so 1.13.0 image
[so.git] / mso-catalog-db / src / main / java / org / onap / so / db / catalog / beans / NetworkTechnologyReference.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2019  Tech Mahindra
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 javax.persistence.Column;
25 import javax.persistence.Entity;
26 import javax.persistence.GeneratedValue;
27 import javax.persistence.GenerationType;
28 import javax.persistence.Id;
29 import javax.persistence.Table;
30 import org.apache.commons.lang3.builder.EqualsBuilder;
31 import org.apache.commons.lang3.builder.HashCodeBuilder;
32 import org.apache.commons.lang3.builder.ToStringBuilder;
33 import com.openpojo.business.annotation.BusinessKey;
34
35 @Entity
36 @Table(name = "network_technology_reference")
37 public class NetworkTechnologyReference implements Serializable {
38
39     private static final long serialVersionUID = 1L;
40
41     @Id
42     @Column(name = "ID", nullable = false, updatable = false)
43     @GeneratedValue(strategy = GenerationType.IDENTITY)
44     private Integer id;
45
46     @BusinessKey
47     @Column(name = "cloud_owner")
48     private String cloudOwner;
49
50     @BusinessKey
51     @Column(name = "network_technology")
52     private String networkTechnology;
53
54     @Override
55     public String toString() {
56         return new ToStringBuilder(this).append("id", id).append("cloudOwner", cloudOwner)
57                 .append("networkTechnology", networkTechnology).toString();
58     }
59
60     @Override
61     public boolean equals(final Object other) {
62         if (!(other instanceof NetworkTechnologyReference)) {
63             return false;
64         }
65         NetworkTechnologyReference castOther = (NetworkTechnologyReference) other;
66         return new EqualsBuilder().append(cloudOwner, castOther.cloudOwner)
67                 .append(networkTechnology, castOther.networkTechnology).isEquals();
68     }
69
70     @Override
71     public int hashCode() {
72         return new HashCodeBuilder().append(cloudOwner).append(networkTechnology).toHashCode();
73     }
74
75     public static long getSerialversionuid() {
76         return serialVersionUID;
77     }
78
79     public Integer getId() {
80         return id;
81     }
82
83     public String getCloudOwner() {
84         return cloudOwner;
85     }
86
87     public void setCloudOwner(String cloudOwner) {
88         this.cloudOwner = cloudOwner;
89     }
90
91     public String getNetworkTechnology() {
92         return networkTechnology;
93     }
94
95     public void setNetworkTechnology(String networkTechnology) {
96         this.networkTechnology = networkTechnology;
97     }
98
99
100
101 }