Change: add OPEN-O seed code for VF-C
[vfc/nfvo/driver/vnfm/svnfm.git] / huawei / vnfmadapter / VnfmadapterService / service / src / main / java / org / openo / nfvo / vnfmadapter / service / entity / Vnfm.java
1 /*
2  * Copyright 2016 Huawei Technologies Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.openo.nfvo.vnfmadapter.service.entity;
18
19 import org.apache.commons.lang3.builder.ToStringBuilder;
20 import org.apache.commons.lang3.builder.ToStringStyle;
21
22 /**
23  * Provide database class
24  * <br/>
25  * <p>
26  * </p>
27  *
28  * @author
29  * @version NFVO 0.5 Sep 3, 2016
30  */
31 public class Vnfm {
32
33     private String id;
34
35     private String version;
36
37     private String vnfdId;
38
39     private String vnfPackageId;
40
41     public String getId() {
42         return id;
43     }
44
45     public void setId(String id) {
46         this.id = id;
47     }
48
49     public String getVersion() {
50         return version;
51     }
52
53     public void setVersion(String version) {
54         this.version = version;
55     }
56
57     public String getVnfdId() {
58         return vnfdId;
59     }
60
61     public void setVnfdId(String vnfdId) {
62         this.vnfdId = vnfdId;
63     }
64
65     public String getVnfPackageId() {
66         return vnfPackageId;
67     }
68
69     public void setVnfPackageId(String vnfPackageId) {
70         this.vnfPackageId = vnfPackageId;
71     }
72
73     @Override
74     public String toString() {
75         return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
76     }
77
78     @Override
79     public int hashCode() {
80         final int prime = 31;
81         int result = 1;
82         result = prime * result + ((id == null) ? 0 : id.hashCode());
83         return result;
84     }
85
86     @Override
87     public boolean equals(Object obj) {
88         if(this == obj) {
89             return true;
90         }
91         if(obj == null) {
92             return false;
93         }
94         if(!(obj instanceof Vnfm)) {
95             return false;
96         }
97         if(getClass() != obj.getClass()) {
98             return false;
99         }
100         Vnfm other = (Vnfm)obj;
101         if(id == null) {
102             if(other.id != null) {
103                 return false;
104             }
105         } else if(!id.equals(other.id)) {
106             return false;
107         }
108         return true;
109     }
110 }