]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3636 Add and feed a new column projects.created_at
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Thu, 27 Sep 2012 09:29:39 +0000 (11:29 +0200)
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Thu, 27 Sep 2012 09:29:39 +0000 (11:29 +0200)
=> Update clone() method on ResourceModel

sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java

index ae8813822ac65b094a201cc13d2c6779be771870..35a6e481340eadccbd1664030f2f2db084d7a32d 100644 (file)
@@ -284,6 +284,10 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable {
     return createdAt;
   }
 
+  public void setCreatedAt(Date createdAt) {
+    this.createdAt = createdAt;
+  }
+
   @Override
   public boolean equals(Object obj) {
     if (!(obj instanceof ResourceModel)) {
@@ -323,6 +327,7 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable {
         .append("rootId", rootId)
         .append("copyResourceId", copyResourceId)
         .append("personId", personId)
+        .append("createdAt", createdAt)
         .toString();
   }
 
@@ -337,6 +342,7 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable {
     clone.setCopyResourceId(getCopyResourceId());
     clone.setLongName(getLongName());
     clone.setPersonId(getPersonId());
+    clone.setCreatedAt(getCreatedAt());
     return clone;
   }