9b35beb015109f3c66f90bfccac211e1e64d5f4f
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / ecomp / model / AppCategoryFunctionsItem.java
1 /*-
2  * ================================================================================
3  * ECOMP Portal
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property
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  * ================================================================================
19  */
20 package org.openecomp.portalapp.portal.ecomp.model;
21
22 import javax.persistence.Entity;
23 import javax.persistence.Id;
24
25 import org.openecomp.portalsdk.core.domain.support.DomainVo;
26 import com.fasterxml.jackson.annotation.JsonInclude;
27
28 /**
29  * Carries row information for the functional table on the Contact Us page.
30  */
31 @Entity
32 @JsonInclude(JsonInclude.Include.NON_NULL)
33 public class AppCategoryFunctionsItem extends DomainVo {
34
35         private static final long serialVersionUID = -1573834082471206458L;
36
37         @Id
38         private String rowId;
39         private String appId;
40         private String application;
41         private String category;
42         private String functions;
43
44         public String getRowId() {
45                 return rowId;
46         }
47
48         public void setRowId(String rowId) {
49                 this.rowId = rowId;
50         }
51
52         public String getAppId() {
53                 return appId;
54         }
55         
56         public void setAppId(String appId) {
57                 this.appId = appId;
58         }
59         
60         public String getApplication() {
61                 return application;
62         }
63
64         public void setApplication(String appName) {
65                 this.application = appName;
66         }
67
68         public String getCategory() {
69                 return category;
70         }
71
72         public void setCategory(String category) {
73                 this.category = category;
74         }
75
76         public String getFunctions() {
77                 return functions;
78         }
79
80         public void setFunctions(String functions) {
81                 this.functions = functions;
82         }
83
84         @Override
85         public String toString() {
86                 return "AppCategoryFunctionsItem [rowId=" + rowId + ", appId=" + appId + ", application=" + application
87                                 + ", category=" + category + ", functions=" + functions + "]";
88         }
89
90         @Override
91         public int hashCode() {
92                 final int prime = 31;
93                 int result = 1;
94                 result = prime * result + ((appId == null) ? 0 : appId.hashCode());
95                 result = prime * result + ((application == null) ? 0 : application.hashCode());
96                 result = prime * result + ((category == null) ? 0 : category.hashCode());
97                 result = prime * result + ((functions == null) ? 0 : functions.hashCode());
98                 result = prime * result + ((rowId == null) ? 0 : rowId.hashCode());
99                 return result;
100         }
101
102         @Override
103         public boolean equals(Object obj) {
104                 if (this == obj)
105                         return true;
106                 if (obj == null)
107                         return false;
108                 if (getClass() != obj.getClass())
109                         return false;
110                 AppCategoryFunctionsItem other = (AppCategoryFunctionsItem) obj;
111                 if (appId == null) {
112                         if (other.appId != null)
113                                 return false;
114                 } else if (!appId.equals(other.appId))
115                         return false;
116                 if (application == null) {
117                         if (other.application != null)
118                                 return false;
119                 } else if (!application.equals(other.application))
120                         return false;
121                 if (category == null) {
122                         if (other.category != null)
123                                 return false;
124                 } else if (!category.equals(other.category))
125                         return false;
126                 if (functions == null) {
127                         if (other.functions != null)
128                                 return false;
129                 } else if (!functions.equals(other.functions))
130                         return false;
131                 if (rowId == null) {
132                         if (other.rowId != null)
133                                 return false;
134                 } else if (!rowId.equals(other.rowId))
135                         return false;
136                 return true;
137         }
138         
139         
140 }