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.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      private String data;
033    
034      public String getId() {
035        return id;
036      }
037    
038      public Event setId(String id) {
039        this.id = id;
040        return this;
041      }
042    
043      public String getName() {
044        return name;
045      }
046    
047      public Event setName(String name) {
048        this.name = name;
049        return this;
050      }
051    
052      public String getCategory() {
053        return category;
054      }
055    
056      public Event setCategory(String category) {
057        this.category = category;
058        return this;
059      }
060    
061      public String getDescription() {
062        return description;
063      }
064    
065      public Event setDescription(String description) {
066        this.description = description;
067        return this;
068      }
069    
070      public Date getDate() {
071        return date;
072      }
073    
074      public Event setDate(Date date) {
075        this.date = date;
076        return this;
077      }
078    
079      public String getResourceKey() {
080        return resourceKey;
081      }
082    
083      public Event setResourceKey(String resourceKey) {
084        this.resourceKey = resourceKey;
085        return this;
086      }
087    
088      public String getData() {
089        return data;
090      }
091    
092      public Event setData(String data) {
093        this.data = data;
094        return this;
095      }
096    
097      @Override
098      public boolean equals(Object o) {
099        if (this == o) {
100          return true;
101        }
102        if (o == null || getClass() != o.getClass()) {
103          return false;
104        }
105    
106        Event event = (Event) o;
107        return !(id != null ? !id.equals(event.id) : event.id != null);
108      }
109    
110      @Override
111      public int hashCode() {
112        return id != null ? id.hashCode() : 0;
113      }
114    }