2  * ================================================================================
 
   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
 
  11  *      http://www.apache.org/licenses/LICENSE-2.0
 
  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  * ================================================================================
 
  20 package org.openecomp.portalapp.portal.domain;
 
  22 import org.openecomp.portalsdk.core.domain.support.DomainVo;
 
  25  * Models a row in the table with personalization of user widget selections.
 
  27 public class PersUserWidgetSelection extends DomainVo {
 
  32         private static final long serialVersionUID = -6547880514779039200L;
 
  36         private Long widgetId;
 
  38         private String statusCode;
 
  40         public PersUserWidgetSelection() {}
 
  43          * Convenience constructor
 
  50         public PersUserWidgetSelection(final Long id, final Long userId, final Long widgetId, final String statusCode) {
 
  53                 this.widgetId = widgetId;
 
  54                 this.statusCode = statusCode;
 
  57         public Long getWidgetId() {
 
  61         public void setWidgetId(Long widgetId) {
 
  62                 this.widgetId = widgetId;
 
  65         public Long getUserId() {
 
  69         public void setUserId(Long userId) {
 
  73         public String getStatusCode() {
 
  77         public void setStatusCode(String statusCode) {
 
  78                 this.statusCode = statusCode;
 
  82         public int hashCode() {
 
  85                 result = prime * result + ((statusCode == null) ? 0 : statusCode.hashCode());
 
  86                 result = prime * result + ((userId == null) ? 0 : userId.hashCode());
 
  87                 result = prime * result + ((widgetId == null) ? 0 : widgetId.hashCode());
 
  92         public boolean equals(Object obj) {
 
  97                 if (getClass() != obj.getClass())
 
  99                 PersUserWidgetSelection other = (PersUserWidgetSelection) obj;
 
 100                 if (statusCode == null) {
 
 101                         if (other.statusCode != null)
 
 103                 } else if (!statusCode.equals(other.statusCode))
 
 105                 if (userId == null) {
 
 106                         if (other.userId != null)
 
 108                 } else if (!userId.equals(other.userId))
 
 110                 if (widgetId == null) {
 
 111                         if (other.widgetId != null)
 
 113                 } else if (!widgetId.equals(other.widgetId))