b0b00759f04356201fc749368c59d60f0fb6fde6
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / VfModuleToHeatFiles.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * OPENECOMP - MSO
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.openecomp.mso.db.catalog.beans;
22
23
24
25 import java.io.Serializable;
26
27 public class VfModuleToHeatFiles implements Serializable {
28         
29     private int vfModuleId;
30     private int heatFilesId;
31     public static final long serialVersionUID = -1322322139926390329L;
32
33         public VfModuleToHeatFiles() {
34                 super();
35         }
36         
37         public int getVfModuleId() {
38                 return this.vfModuleId;
39         }
40         public void setVfModuleId(int vfModuleId) {
41                 this.vfModuleId = vfModuleId;
42         }
43         
44         public int getHeatFilesId() {
45                 return this.heatFilesId;
46         }
47         public void setHeatFilesId(int heatFilesId) {
48                 this.heatFilesId = heatFilesId;
49         }
50         
51     @Override
52     public String toString () {
53         StringBuilder sb = new StringBuilder ();
54         sb.append ("VF_MODULE_ID=" + this.vfModuleId);
55         sb.append (", HEAT_FILES_ID=" + this.heatFilesId);
56         return sb.toString ();
57     }
58
59     @Override
60     public boolean equals (Object o) {
61         if (!(o instanceof VfModuleToHeatFiles)) {
62             return false;
63         }
64         if (this == o) {
65             return true;
66         }
67         VfModuleToHeatFiles vmthf = (VfModuleToHeatFiles) o;
68         if (vmthf.getVfModuleId() == this.getVfModuleId() && vmthf.getVfModuleId() == this.getVfModuleId()) {
69             return true;
70         }
71         return false;
72     }
73
74     @Override
75     public int hashCode () {
76         // hash code does not have to be a unique result - only that two objects that should be treated as equal
77         // return the same value. so this should work.
78         int result = 0;
79         result = this.vfModuleId + this.heatFilesId;
80         return result;
81     }
82
83 }