Update license; improve coverage; add docs dir
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / ecomp / model / AppCategoryFunctionsItem.java
1 /*-
2  * ============LICENSE_START==========================================
3  * ONAP Portal
4  * ===================================================================
5  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * ===================================================================
7  *
8  * Unless otherwise specified, all software contained herein is licensed
9  * under the Apache License, Version 2.0 (the “License”);
10  * you may not use this software except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *             http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * Unless otherwise specified, all documentation contained herein is licensed
22  * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
23  * you may not use this documentation except in compliance with the License.
24  * You may obtain a copy of the License at
25  *
26  *             https://creativecommons.org/licenses/by/4.0/
27  *
28  * Unless required by applicable law or agreed to in writing, documentation
29  * distributed under the License is distributed on an "AS IS" BASIS,
30  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31  * See the License for the specific language governing permissions and
32  * limitations under the License.
33  *
34  * ============LICENSE_END============================================
35  *
36  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
37  */
38 package org.openecomp.portalapp.portal.ecomp.model;
39
40 import javax.persistence.Entity;
41 import javax.persistence.Id;
42
43 import org.openecomp.portalsdk.core.domain.support.DomainVo;
44 import com.fasterxml.jackson.annotation.JsonInclude;
45
46 /**
47  * Carries row information for the functional table on the Contact Us page.
48  */
49 @Entity
50 @JsonInclude(JsonInclude.Include.NON_NULL)
51 public class AppCategoryFunctionsItem extends DomainVo {
52
53         private static final long serialVersionUID = -1573834082471206458L;
54
55         @Id
56         private String rowId;
57         private String appId;
58         private String application;
59         private String category;
60         private String functions;
61
62         public String getRowId() {
63                 return rowId;
64         }
65
66         public void setRowId(String rowId) {
67                 this.rowId = rowId;
68         }
69
70         public String getAppId() {
71                 return appId;
72         }
73         
74         public void setAppId(String appId) {
75                 this.appId = appId;
76         }
77         
78         public String getApplication() {
79                 return application;
80         }
81
82         public void setApplication(String appName) {
83                 this.application = appName;
84         }
85
86         public String getCategory() {
87                 return category;
88         }
89
90         public void setCategory(String category) {
91                 this.category = category;
92         }
93
94         public String getFunctions() {
95                 return functions;
96         }
97
98         public void setFunctions(String functions) {
99                 this.functions = functions;
100         }
101
102         @Override
103         public String toString() {
104                 return "AppCategoryFunctionsItem [rowId=" + rowId + ", appId=" + appId + ", application=" + application
105                                 + ", category=" + category + ", functions=" + functions + "]";
106         }
107
108         @Override
109         public int hashCode() {
110                 final int prime = 31;
111                 int result = 1;
112                 result = prime * result + ((appId == null) ? 0 : appId.hashCode());
113                 result = prime * result + ((application == null) ? 0 : application.hashCode());
114                 result = prime * result + ((category == null) ? 0 : category.hashCode());
115                 result = prime * result + ((functions == null) ? 0 : functions.hashCode());
116                 result = prime * result + ((rowId == null) ? 0 : rowId.hashCode());
117                 return result;
118         }
119
120         @Override
121         public boolean equals(Object obj) {
122                 if (this == obj)
123                         return true;
124                 if (obj == null)
125                         return false;
126                 if (getClass() != obj.getClass())
127                         return false;
128                 AppCategoryFunctionsItem other = (AppCategoryFunctionsItem) obj;
129                 if (appId == null) {
130                         if (other.appId != null)
131                                 return false;
132                 } else if (!appId.equals(other.appId))
133                         return false;
134                 if (application == null) {
135                         if (other.application != null)
136                                 return false;
137                 } else if (!application.equals(other.application))
138                         return false;
139                 if (category == null) {
140                         if (other.category != null)
141                                 return false;
142                 } else if (!category.equals(other.category))
143                         return false;
144                 if (functions == null) {
145                         if (other.functions != null)
146                                 return false;
147                 } else if (!functions.equals(other.functions))
148                         return false;
149                 if (rowId == null) {
150                         if (other.rowId != null)
151                                 return false;
152                 } else if (!rowId.equals(other.rowId))
153                         return false;
154                 return true;
155         }
156         
157         
158 }