0317653ef808c35a58513b0cfbc71f141c1dc36f
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / VnfResCustomToVfModuleCustom.java
1 /*-\r
2  * ============LICENSE_START=======================================================\r
3  * OPENECOMP - MSO\r
4  * ================================================================================\r
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
6  * ================================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  *\r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  *\r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ============LICENSE_END=========================================================\r
19  */\r
20 \r
21 package org.openecomp.mso.db.catalog.beans;\r
22 \r
23 import java.io.Serializable;\r
24 import java.sql.Timestamp;\r
25 \r
26 public class VnfResCustomToVfModuleCustom implements Serializable {\r
27         \r
28         private String vnfResourceCustModelCustomizationUuid;\r
29         private String vfModuleCustModelCustomizationUuid;\r
30         private Timestamp created;\r
31         \r
32     public static final long serialVersionUID = -1322322139926390329L;\r
33 \r
34 \r
35         public VnfResCustomToVfModuleCustom() {\r
36                 super();\r
37         }\r
38         public String getVnfResourceCustModelCustomizationUuid() {\r
39                 return this.vnfResourceCustModelCustomizationUuid;\r
40         }\r
41         public void setVnfResourceCustModelCustomizationUuid(String vnfResourceCustModelCustomizationUuid) {\r
42                 this.vnfResourceCustModelCustomizationUuid = vnfResourceCustModelCustomizationUuid;\r
43         }\r
44         public String getVfModuleCustModelCustomizationUuid() {\r
45                 return this.vfModuleCustModelCustomizationUuid;\r
46         }\r
47         public void setVfModuleCustModelCustomizationUuid(String vfModuleCustModelCustomizationUuid) {\r
48                 this.vfModuleCustModelCustomizationUuid = vfModuleCustModelCustomizationUuid;\r
49         }\r
50         public Timestamp getCreated() {\r
51                 return created;\r
52         }\r
53         public void setCreated(Timestamp created) {\r
54                 this.created = created;\r
55         }\r
56         @Override\r
57         public String toString() {\r
58                 StringBuilder sb = new StringBuilder();\r
59                 sb.append("vnfResourceCustModelCustomizationUuid=" + this.vnfResourceCustModelCustomizationUuid);\r
60                 sb.append("vfModuleCustModelCustomizationUuid=" + this.vfModuleCustModelCustomizationUuid);\r
61                 sb.append("created=" + this.created);\r
62                 return sb.toString();\r
63         }\r
64     @Override\r
65     public boolean equals (Object o) {\r
66         if (!(o instanceof VnfResCustomToVfModuleCustom)) {\r
67             return false;\r
68         }\r
69         if (this == o) {\r
70             return true;\r
71         }\r
72         VnfResCustomToVfModuleCustom vrctvmc = (VnfResCustomToVfModuleCustom) o;\r
73         if (vrctvmc.getVnfResourceCustModelCustomizationUuid().equals(this.getVnfResourceCustModelCustomizationUuid()) && vrctvmc.getVfModuleCustModelCustomizationUuid().equals(this.getVfModuleCustModelCustomizationUuid())) {\r
74             return true;\r
75         }\r
76         return false;\r
77     }\r
78 \r
79     @Override\r
80     public int hashCode () {\r
81         // hash code does not have to be a unique result - only that two objects that should be treated as equal\r
82         // return the same value. so this should work.\r
83         int result = 0;\r
84         result = (this.vnfResourceCustModelCustomizationUuid != null ? this.vnfResourceCustModelCustomizationUuid.hashCode() : 0) + (this.vfModuleCustModelCustomizationUuid != null ? this.vfModuleCustModelCustomizationUuid.hashCode() : 0);\r
85         return result;\r
86     }\r
87 \r
88 \r
89 }\r