import org.sonar.api.rule.RuleKey;
import org.sonar.api.utils.Duration;
import org.sonar.api.utils.KeyValueFormat;
+import org.sonar.core.persistence.Dto;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
-
import java.io.Serializable;
import java.util.Date;
/**
* @since 3.6
*/
-public final class IssueDto implements Serializable {
+public final class IssueDto extends Dto<String> implements Serializable {
+
private Long id;
private String kee;
private Date issueUpdateDate;
private Date issueCloseDate;
- // technical dates
- private Date createdAt;
- private Date updatedAt;
-
/**
* Temporary date used only during scan
*/
private String componentKey;
private String rootComponentKey;
+
+ @Override
+ public String getKey() {
+ return kee;
+ }
+
public Long getId() {
return id;
}
return this;
}
- public Date getCreatedAt() {
- return createdAt;
- }
-
+ @Override
public IssueDto setCreatedAt(Date createdAt) {
- this.createdAt = createdAt;
+ super.setCreatedAt(createdAt);
return this;
}
- public Date getUpdatedAt() {
- return updatedAt;
- }
-
+ @Override
public IssueDto setUpdatedAt(@Nullable Date updatedAt) {
- this.updatedAt = updatedAt;
+ super.setUpdatedAt(updatedAt);
return this;
}
public abstract K getKey();
- public final void setCreatedAt(Date datetime) {
+ public Dto setCreatedAt(Date datetime) {
this.createdAt = datetime;
+ return this;
}
- public final void setUpdatedAt(Date datetime) {
+ public Dto setUpdatedAt(Date datetime) {
this.updatedAt = datetime;
+ return this;
}
public final Date getCreatedAt() {