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.review; 021 022 import org.apache.commons.lang.builder.ToStringBuilder; 023 import org.apache.commons.lang.builder.ToStringStyle; 024 025 import java.util.Date; 026 027 /** 028 * @since 2.13 029 */ 030 public final class ReviewDto { 031 032 public static final String STATUS_OPEN = "OPEN"; 033 public static final String STATUS_REOPENED = "REOPENED"; 034 public static final String STATUS_RESOLVED = "RESOLVED"; 035 public static final String STATUS_CLOSED = "CLOSED"; 036 037 private Long id; 038 private Integer userId; 039 private Integer assigneeId; 040 private String title; 041 private String status; 042 private String resolution; 043 private Integer violationPermanentId; 044 private Integer projectId; 045 private Integer resourceId; 046 private Integer line; 047 private Date createdAt; 048 private Date updatedAt; 049 private String severity; 050 private Integer ruleId; 051 private Boolean manualViolation; 052 private Boolean manualSeverity; 053 054 public Long getId() { 055 return id; 056 } 057 058 public ReviewDto setId(Long id) { 059 this.id = id; 060 return this; 061 } 062 063 public Integer getUserId() { 064 return userId; 065 } 066 067 public ReviewDto setUserId(Integer userId) { 068 this.userId = userId; 069 return this; 070 } 071 072 public Integer getAssigneeId() { 073 return assigneeId; 074 } 075 076 public ReviewDto setAssigneeId(Integer assigneeId) { 077 this.assigneeId = assigneeId; 078 return this; 079 } 080 081 public String getTitle() { 082 return title; 083 } 084 085 public ReviewDto setTitle(String title) { 086 this.title = title; 087 return this; 088 } 089 090 public String getStatus() { 091 return status; 092 } 093 094 public ReviewDto setStatus(String status) { 095 this.status = status; 096 return this; 097 } 098 099 public String getResolution() { 100 return resolution; 101 } 102 103 public ReviewDto setResolution(String resolution) { 104 this.resolution = resolution; 105 return this; 106 } 107 108 public Integer getViolationPermanentId() { 109 return violationPermanentId; 110 } 111 112 public ReviewDto setViolationPermanentId(Integer violationPermanentId) { 113 this.violationPermanentId = violationPermanentId; 114 return this; 115 } 116 117 public Integer getProjectId() { 118 return projectId; 119 } 120 121 public ReviewDto setProjectId(Integer projectId) { 122 this.projectId = projectId; 123 return this; 124 } 125 126 public Integer getResourceId() { 127 return resourceId; 128 } 129 130 public ReviewDto setResourceId(Integer resourceId) { 131 this.resourceId = resourceId; 132 return this; 133 } 134 135 public Integer getLine() { 136 return line; 137 } 138 139 public ReviewDto setLine(Integer line) { 140 this.line = line; 141 return this; 142 } 143 144 public Date getCreatedAt() { 145 return createdAt; 146 } 147 148 public ReviewDto setCreatedAt(Date createdAt) { 149 this.createdAt = createdAt; 150 return this; 151 } 152 153 public Date getUpdatedAt() { 154 return updatedAt; 155 } 156 157 public ReviewDto setUpdatedAt(Date updatedAt) { 158 this.updatedAt = updatedAt; 159 return this; 160 } 161 162 public String getSeverity() { 163 return severity; 164 } 165 166 public ReviewDto setSeverity(String severity) { 167 this.severity = severity; 168 return this; 169 } 170 171 public Integer getRuleId() { 172 return ruleId; 173 } 174 175 public ReviewDto setRuleId(Integer ruleId) { 176 this.ruleId = ruleId; 177 return this; 178 } 179 180 public Boolean getManualViolation() { 181 return manualViolation; 182 } 183 184 public ReviewDto setManualViolation(Boolean b) { 185 this.manualViolation = b; 186 return this; 187 } 188 189 public Boolean getManualSeverity() { 190 return manualSeverity; 191 } 192 193 public ReviewDto setManualSeverity(Boolean b) { 194 this.manualSeverity = b; 195 return this; 196 } 197 198 @Override 199 public String toString() { 200 return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); 201 } 202 }