001 /* 002 * Sonar, open source software quality management tool. 003 * Copyright (C) 2008-2011 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 import org.apache.commons.lang.builder.EqualsBuilder; 023 import org.apache.commons.lang.builder.HashCodeBuilder; 024 025 public final class ActiveDashboardDto { 026 027 private Long id; 028 private Long dashboardId; 029 private Long userId; 030 private Integer orderIndex; 031 032 /** 033 * @return the id 034 */ 035 public Long getId() { 036 return id; 037 } 038 039 /** 040 * @param id the id to set 041 */ 042 public void setId(Long id) { 043 this.id = id; 044 } 045 046 /** 047 * @return the dashboardId 048 */ 049 public Long getDashboardId() { 050 return dashboardId; 051 } 052 053 /** 054 * @param dashboardId the dashboardId to set 055 */ 056 public void setDashboardId(Long dashboardId) { 057 this.dashboardId = dashboardId; 058 } 059 060 /** 061 * @return the userId 062 */ 063 public Long getUserId() { 064 return userId; 065 } 066 067 /** 068 * @param userId the userId to set 069 */ 070 public void setUserId(Long userId) { 071 this.userId = userId; 072 } 073 074 /** 075 * @return the orderIndex 076 */ 077 public Integer getOrderIndex() { 078 return orderIndex; 079 } 080 081 /** 082 * @param orderIndex the orderIndex to set 083 */ 084 public void setOrderIndex(Integer orderIndex) { 085 this.orderIndex = orderIndex; 086 } 087 088 @Override 089 public boolean equals(Object o) { 090 if (this == o) { 091 return true; 092 } 093 if (o == null || getClass() != o.getClass()) { 094 return false; 095 } 096 ActiveDashboardDto that = (ActiveDashboardDto) o; 097 return !(id != null ? !id.equals(that.id) : that.id != null); 098 099 } 100 101 @Override 102 public int hashCode() { 103 return id != null ? id.hashCode() : 0; 104 } 105 }