001 /* 002 * Sonar, open source software quality management tool. 003 * Copyright (C) 2008-2012 SonarSource 004 * mailto:contact AT sonarsource DOT com 005 * 006 * Sonar is free software; you can redistribute it and/or 007 * modify it under the terms of the GNU Lesser General Public 008 * License as published by the Free Software Foundation; either 009 * version 3 of the License, or (at your option) any later version. 010 * 011 * Sonar is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 014 * Lesser General Public License for more details. 015 * 016 * You should have received a copy of the GNU Lesser General Public 017 * License along with Sonar; if not, write to the Free Software 018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 019 */ 020 package org.sonar.core.dashboard; 021 022 public final class ActiveDashboardDto { 023 024 private Long id; 025 private Long dashboardId; 026 private Long userId; 027 private Integer orderIndex; 028 029 /** 030 * @return the id 031 */ 032 public Long getId() { 033 return id; 034 } 035 036 /** 037 * @param id the id to set 038 */ 039 public void setId(Long id) { 040 this.id = id; 041 } 042 043 /** 044 * @return the dashboardId 045 */ 046 public Long getDashboardId() { 047 return dashboardId; 048 } 049 050 /** 051 * @param dashboardId the dashboardId to set 052 */ 053 public void setDashboardId(Long dashboardId) { 054 this.dashboardId = dashboardId; 055 } 056 057 /** 058 * @return the userId 059 */ 060 public Long getUserId() { 061 return userId; 062 } 063 064 /** 065 * @param userId the userId to set 066 */ 067 public void setUserId(Long userId) { 068 this.userId = userId; 069 } 070 071 /** 072 * @return the orderIndex 073 */ 074 public Integer getOrderIndex() { 075 return orderIndex; 076 } 077 078 /** 079 * @param orderIndex the orderIndex to set 080 */ 081 public void setOrderIndex(Integer orderIndex) { 082 this.orderIndex = orderIndex; 083 } 084 085 @Override 086 public boolean equals(Object o) { 087 if (this == o) { 088 return true; 089 } 090 if (o == null || getClass() != o.getClass()) { 091 return false; 092 } 093 ActiveDashboardDto that = (ActiveDashboardDto) o; 094 return !(id != null ? !id.equals(that.id) : that.id != null); 095 096 } 097 098 @Override 099 public int hashCode() { 100 return id != null ? id.hashCode() : 0; 101 } 102 }