Merge "Reorder modifiers"
[so.git] / mso-catalog-db / src / main / java / org / openecomp / mso / db / catalog / beans / ServiceToAllottedResources.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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 package org.openecomp.mso.db.catalog.beans;
21
22 import java.io.Serializable;
23 import java.sql.Timestamp;
24
25 import com.openpojo.business.annotation.BusinessKey;
26
27 public class ServiceToAllottedResources implements Serializable {
28
29         @BusinessKey
30         private String serviceModelUuid = null;
31         @BusinessKey
32         private String arModelCustomizationUuid = null;
33         private Timestamp created = null;
34
35         public static final long serialVersionUID = -1322322139926390329L;
36
37         public ServiceToAllottedResources() {
38                 super();
39         }
40
41         public String getServiceModelUuid() {
42                 return this.serviceModelUuid;
43         }
44         public void setServiceModelUuid(String serviceModelUuid) {
45                 this.serviceModelUuid = serviceModelUuid;
46         }
47         public String getArModelCustomizationUuid() {
48                 return this.arModelCustomizationUuid;
49         }
50         public void setArModelCustomizationUuid(String arModelCustomizationUuid) {
51                 this.arModelCustomizationUuid = arModelCustomizationUuid;
52         }
53         public Timestamp getCreated() {
54                 return this.created;
55         }
56         public void setCreated(Timestamp created) {
57                 this.created = created;
58         }
59
60         @Override
61         public boolean equals(Object o) {
62         if (!(o instanceof ServiceToAllottedResources)) {
63             return false;
64         }
65         if (this == o) {
66             return true;
67         }
68         ServiceToAllottedResources star = (ServiceToAllottedResources) o;
69         if (star.getArModelCustomizationUuid().equals(this.getArModelCustomizationUuid())
70                         && star.getServiceModelUuid().equals(this.getServiceModelUuid())) {
71             return true;
72         } 
73         return false;
74         }
75         
76         @Override 
77         public int hashCode() {
78
79                 int code = this.arModelCustomizationUuid == null ? 0 : this.arModelCustomizationUuid.hashCode();
80                 code += this.serviceModelUuid == null ? 0 : this.serviceModelUuid.hashCode();
81                 
82                 return code;
83         }
84
85         @Override
86         public String toString() {
87                 return "serviceModelUuid=" + this.serviceModelUuid + "arModelCustomizationUuid=" + this.arModelCustomizationUuid;
88         }
89
90 }