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