Change the header to SO
[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 public class ServiceToAllottedResources implements Serializable {
26
27         private String serviceModelUuid;
28         private String arModelCustomizationUuid;
29         private Timestamp created;
30
31         public static final long serialVersionUID = -1322322139926390329L;
32
33         public ServiceToAllottedResources() {
34                 super();
35         }
36
37         public String getServiceModelUuid() {
38                 return this.serviceModelUuid;
39         }
40         public void setServiceModelUuid(String serviceModelUuid) {
41                 this.serviceModelUuid = serviceModelUuid;
42         }
43         public String getArModelCustomizationUuid() {
44                 return this.arModelCustomizationUuid;
45         }
46         public void setArModelCustomizationUuid(String arModelCustomizationUuid) {
47                 this.arModelCustomizationUuid = arModelCustomizationUuid;
48         }
49         public Timestamp getCreated() {
50                 return this.created;
51         }
52         public void setCreated(Timestamp created) {
53                 this.created = created;
54         }
55
56         @Override
57         public boolean equals(Object o) {
58         if (!(o instanceof ServiceToAllottedResources)) {
59             return false;
60         }
61         if (this == o) {
62             return true;
63         }
64         ServiceToAllottedResources star = (ServiceToAllottedResources) o;
65         if (star.getArModelCustomizationUuid().equals(this.getArModelCustomizationUuid())
66                         && star.getServiceModelUuid().equals(this.getServiceModelUuid())) {
67             return true;
68         } 
69         return false;
70         }
71         
72         @Override 
73         public int hashCode() {
74                 
75                 int code = this.arModelCustomizationUuid == null ? 0 : this.arModelCustomizationUuid.hashCode();
76                 code += this.serviceModelUuid == null ? 0 : this.serviceModelUuid.hashCode();
77                 
78                 return code;
79         }
80         
81         @Override
82         public String toString() {
83                 StringBuilder sb = new StringBuilder();
84                 sb.append("serviceModelUuid=");
85                 sb.append(this.serviceModelUuid);
86                 sb.append("arModelCustomizationUuid=");
87                 sb.append(this.arModelCustomizationUuid);
88
89                 return sb.toString();
90         }
91
92 }