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