001    /*
002     * Sonar, open source software quality management tool.
003     * Copyright (C) 2009 SonarSource SA
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.wsclient.services;
021    
022    import java.util.Date;
023    
024    public class Event extends Model {
025    
026      private String id;
027      private String name;
028      private String category;
029      private String description;
030      private String resourceKey;
031      private Date date;
032    
033      public String getId() {
034        return id;
035      }
036    
037      public Event setId(String id) {
038        this.id = id;
039        return this;
040      }
041    
042      public String getName() {
043        return name;
044      }
045    
046      public Event setName(String name) {
047        this.name = name;
048        return this;
049      }
050    
051      public String getCategory() {
052        return category;
053      }
054    
055      public Event setCategory(String category) {
056        this.category = category;
057        return this;
058      }
059    
060      public String getDescription() {
061        return description;
062      }
063    
064      public Event setDescription(String description) {
065        this.description = description;
066        return this;
067      }
068    
069      public Date getDate() {
070        return date;
071      }
072    
073      public Event setDate(Date date) {
074        this.date = date;
075        return this;
076      }
077    
078      public String getResourceKey() {
079        return resourceKey;
080      }
081    
082      public Event setResourceKey(String resourceKey) {
083        this.resourceKey = resourceKey;
084        return this;
085      }
086    
087      @Override
088      public boolean equals(Object o) {
089        if (this == o) {
090          return true;
091        }
092        if (o == null || getClass() != o.getClass()) {
093          return false;
094        }
095    
096        Event event = (Event) o;
097        return !(id != null ? !id.equals(event.id) : event.id != null);
098      }
099    
100      @Override
101      public int hashCode() {
102        return id != null ? id.hashCode() : 0;
103      }
104    }