[DMAAP-BC] Consolidate bus controller repos
[dmaap/buscontroller.git] / dmaap-bc / src / main / java / org / onap / dmaap / dbcapi / model / DR_Node.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * org.onap.dmaap
4  * ================================================================================
5  * Copyright (C) 2017 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.dmaap.dbcapi.model;
22
23 import javax.xml.bind.annotation.XmlRootElement;
24 import java.util.Objects;
25
26 @XmlRootElement
27 public class DR_Node extends DmaapObject {
28         private String fqdn;
29         private String dcaeLocationName;
30         private String hostName;
31         private String version;
32         
33         public DR_Node() {
34                 
35         }
36         
37         public DR_Node( String f,
38                                         String dLN,
39                                         String hN,
40                                         String v ) {
41                 this.fqdn = f;
42                 this.dcaeLocationName = dLN;
43                 this.hostName = hN;
44                 this.version = v;
45         }
46
47         public String getFqdn() {
48                 return fqdn;
49         }
50
51         public void setFqdn(String fqdn) {
52                 this.fqdn = fqdn;
53         }
54
55         public String getDcaeLocationName() {
56                 return dcaeLocationName;
57         }
58
59         public void setDcaeLocationName(String dcaeLocationName) {
60                 this.dcaeLocationName = dcaeLocationName;
61         }
62
63         public String getHostName() {
64                 return hostName;
65         }
66
67         public void setHostName(String hostName) {
68                 this.hostName = hostName;
69         }
70
71         public String getVersion() {
72                 return version;
73         }
74
75         public void setVersion(String version) {
76                 this.version = version;
77         }
78
79         @Override
80         public boolean equals(Object o) {
81                 if (this == o) return true;
82                 if (o == null || getClass() != o.getClass()) return false;
83                 DR_Node dr_node = (DR_Node) o;
84                 return Objects.equals(fqdn, dr_node.fqdn) &&
85                                 Objects.equals(dcaeLocationName, dr_node.dcaeLocationName) &&
86                                 Objects.equals(hostName, dr_node.hostName) &&
87                                 Objects.equals(version, dr_node.version);
88         }
89
90         @Override
91         public int hashCode() {
92                 return Objects.hash(fqdn, dcaeLocationName, hostName, version);
93         }
94 }