[PORTAL-7] Rebase
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / AppCatalogPersonalization.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.transport;\r
21 \r
22 /**\r
23  * Model for the object PUT to the controller when the user takes an action on\r
24  * an application in the catalog.\r
25  */\r
26 public class AppCatalogPersonalization {\r
27 \r
28         public Long appId;\r
29         public Boolean select;\r
30         public Boolean pending;\r
31 \r
32         public Long getAppId() {\r
33                 return appId;\r
34         }\r
35 \r
36         public void setAppId(Long appId) {\r
37                 this.appId = appId;\r
38         }\r
39 \r
40         public Boolean getSelect() {\r
41                 return select;\r
42         }\r
43 \r
44         public void setSelect(Boolean select) {\r
45                 this.select = select;\r
46         }\r
47 \r
48         public Boolean getPending() {\r
49                 return pending;\r
50         }\r
51 \r
52         public void setPending(Boolean pending) {\r
53                 this.pending = pending;\r
54         }\r
55 \r
56         @Override\r
57         public int hashCode() {\r
58                 final int prime = 31;\r
59                 int result = 1;\r
60                 result = prime * result + ((appId == null) ? 0 : appId.hashCode());\r
61                 result = prime * result + ((pending == null) ? 0 : pending.hashCode());\r
62                 result = prime * result + ((select == null) ? 0 : select.hashCode());\r
63                 return result;\r
64         }\r
65 \r
66         @Override\r
67         public boolean equals(Object obj) {\r
68                 if (this == obj)\r
69                         return true;\r
70                 if (obj == null)\r
71                         return false;\r
72                 if (getClass() != obj.getClass())\r
73                         return false;\r
74                 AppCatalogPersonalization other = (AppCatalogPersonalization) obj;\r
75                 if (appId == null) {\r
76                         if (other.appId != null)\r
77                                 return false;\r
78                 } else if (!appId.equals(other.appId))\r
79                         return false;\r
80                 if (pending == null) {\r
81                         if (other.pending != null)\r
82                                 return false;\r
83                 } else if (!pending.equals(other.pending))\r
84                         return false;\r
85                 if (select == null) {\r
86                         if (other.select != null)\r
87                                 return false;\r
88                 } else if (!select.equals(other.select))\r
89                         return false;\r
90                 return true;\r
91         }\r
92 \r
93         \r
94 }\r