]> source.dussan.org Git - sonarqube.git/commitdiff
Add MeasureData#toString()
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 20 Sep 2011 12:58:07 +0000 (14:58 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 20 Sep 2011 12:58:07 +0000 (14:58 +0200)
sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureData.java

index c9606f6a265918f25476e2492655acc0802d4bf7..755e65df0f1515089c30fd4008302e7b9c942891 100644 (file)
@@ -19,6 +19,8 @@
  */
 package org.sonar.api.database.model;
 
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
 import org.sonar.api.database.BaseIdentifiable;
 
 import javax.persistence.*;
@@ -84,5 +86,14 @@ public class MeasureData extends BaseIdentifiable {
   public void setSnapshotId(Integer snapshotId) {
     this.snapshotId = snapshotId;
   }
+
+  @Override
+  public String toString() {
+    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
+        .append("snapshotId", snapshotId)
+        .append("mesasure", measure)
+        .append("data", data)
+        .toString();
+  }
 }