From: Fabrice Bellingard Date: Thu, 27 Sep 2012 09:56:08 +0000 (+0200) Subject: SONAR-3636 Update MyBatis DTO method name X-Git-Tag: 3.3~194 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b962250845d848e5c1f32eaee8deafc4792943a4;p=sonarqube.git SONAR-3636 Update MyBatis DTO method name --- diff --git a/sonar-core/src/main/java/org/sonar/core/resource/ResourceDao.java b/sonar-core/src/main/java/org/sonar/core/resource/ResourceDao.java index deaa26e9baf..7d50a1094b8 100644 --- a/sonar-core/src/main/java/org/sonar/core/resource/ResourceDao.java +++ b/sonar-core/src/main/java/org/sonar/core/resource/ResourceDao.java @@ -106,7 +106,7 @@ public class ResourceDao { try { for (ResourceDto resource : resources) { if (resource.getId() == null) { - resource.setDate(new Date()); + resource.setCreatedAt(new Date()); mapper.insert(resource); } else { mapper.update(resource); diff --git a/sonar-core/src/main/java/org/sonar/core/resource/ResourceDto.java b/sonar-core/src/main/java/org/sonar/core/resource/ResourceDto.java index d8855935b84..73ee680a5d4 100644 --- a/sonar-core/src/main/java/org/sonar/core/resource/ResourceDto.java +++ b/sonar-core/src/main/java/org/sonar/core/resource/ResourceDto.java @@ -36,7 +36,7 @@ public final class ResourceDto { private Long copyResourceId; private Long personId; private Long profileId; - private Date date; + private Date createdAt; public Long getId() { return id; @@ -155,12 +155,12 @@ public final class ResourceDto { return this; } - public Date getDate() { - return date;// NOSONAR May expose internal representation by returning reference to mutable object + public Date getCreatedAt() { + return createdAt;// NOSONAR May expose internal representation by returning reference to mutable object } - public ResourceDto setDate(Date date) { - this.date = date;// NOSONAR May expose internal representation by incorporating reference to mutable object + public ResourceDto setCreatedAt(Date date) { + this.createdAt = date;// NOSONAR May expose internal representation by incorporating reference to mutable object return this; } } diff --git a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml index de2ba7b4c45..1d51aff6cc6 100644 --- a/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml +++ b/sonar-core/src/main/resources/org/sonar/core/resource/ResourceMapper.xml @@ -35,7 +35,7 @@ - +