001/* 002 * SonarQube, open source software quality management tool. 003 * Copyright (C) 2008-2014 SonarSource 004 * mailto:contact AT sonarsource DOT com 005 * 006 * SonarQube 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 * SonarQube 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 License 017 * along with this program; if not, write to the Free Software Foundation, 018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 019 */ 020package org.sonar.batch.protocol.input; 021 022import java.util.Date; 023 024public class QProfile { 025 026 private final String key, name, language; 027 private final Date rulesUpdatedAt; 028 029 public QProfile(String key, String name, String language, Date rulesUpdatedAt) { 030 this.key = key; 031 this.name = name; 032 this.language = language; 033 this.rulesUpdatedAt = rulesUpdatedAt; 034 } 035 036 public String key() { 037 return key; 038 } 039 040 public String name() { 041 return name; 042 } 043 044 public String language() { 045 return language; 046 } 047 048 public Date rulesUpdatedAt() { 049 return rulesUpdatedAt; 050 } 051 052 @Override 053 public boolean equals(Object o) { 054 if (this == o) { 055 return true; 056 } 057 if (o == null || getClass() != o.getClass()) { 058 return false; 059 } 060 061 QProfile qProfile = (QProfile) o; 062 return key.equals(qProfile.key); 063 } 064 065 @Override 066 public int hashCode() { 067 return key.hashCode(); 068 } 069}