--- a/temp/org.ossmeter.platform.mining.msr14/src/org/ossmeter/platform/mining/msr14/model/Commit.java
+++ b/temp/org.ossmeter.platform.mining.msr14/src/org/ossmeter/platform/mining/msr14/model/Commits.java
@@ -6,37 +6,51 @@
import com.googlecode.pongo.runtime.querying.*;
-public class Commit extends Countable {
+public class Commits extends Pongo {
+
+ protected List<String> commitTimes = null;
-
- public Commit() {
+ public Commits() {
super();
- super.setSuperTypes("org.ossmeter.platform.mining.msr14.model.Countable");
- NUMBER.setOwningType("org.ossmeter.platform.mining.msr14.model.Commit");
- FREQUENCY.setOwningType("org.ossmeter.platform.mining.msr14.model.Commit");
- TOTAL.setOwningType("org.ossmeter.platform.mining.msr14.model.Commit");
- ADDITIONS.setOwningType("org.ossmeter.platform.mining.msr14.model.Commit");
- DELETIONS.setOwningType("org.ossmeter.platform.mining.msr14.model.Commit");
- TOTALFILES.setOwningType("org.ossmeter.platform.mining.msr14.model.Commit");
- AVERAGEFILESPERCOMMIT.setOwningType("org.ossmeter.platform.mining.msr14.model.Commit");
+ dbObject.put("commitTimes", new BasicDBList());
+ COUNT.setOwningType("org.ossmeter.platform.mining.msr14.model.Commits");
+ TOTALCHANGES.setOwningType("org.ossmeter.platform.mining.msr14.model.Commits");
+ ADDITIONS.setOwningType("org.ossmeter.platform.mining.msr14.model.Commits");
+ DELETIONS.setOwningType("org.ossmeter.platform.mining.msr14.model.Commits");
+ ASAUTHOR.setOwningType("org.ossmeter.platform.mining.msr14.model.Commits");
+ ASCOMMITTER.setOwningType("org.ossmeter.platform.mining.msr14.model.Commits");
+ TOTALFILES.setOwningType("org.ossmeter.platform.mining.msr14.model.Commits");
+ AVERAGEFILESPERCOMMIT.setOwningType("org.ossmeter.platform.mining.msr14.model.Commits");
+ COMMITTIMES.setOwningType("org.ossmeter.platform.mining.msr14.model.Commits");
}
- public static NumericalQueryProducer NUMBER = new NumericalQueryProducer("number");
- public static NumericalQueryProducer FREQUENCY = new NumericalQueryProducer("frequency");
- public static NumericalQueryProducer TOTAL = new NumericalQueryProducer("total");
+ public static NumericalQueryProducer COUNT = new NumericalQueryProducer("count");
+ public static NumericalQueryProducer TOTALCHANGES = new NumericalQueryProducer("totalChanges");
public static NumericalQueryProducer ADDITIONS = new NumericalQueryProducer("additions");
public static NumericalQueryProducer DELETIONS = new NumericalQueryProducer("deletions");
+ public static NumericalQueryProducer ASAUTHOR = new NumericalQueryProducer("asAuthor");
+ public static NumericalQueryProducer ASCOMMITTER = new NumericalQueryProducer("asCommitter");
public static NumericalQueryProducer TOTALFILES = new NumericalQueryProducer("totalFiles");
public static NumericalQueryProducer AVERAGEFILESPERCOMMIT = new NumericalQueryProducer("averageFilesPerCommit");
+ public static ArrayQueryProducer COMMITTIMES = new ArrayQueryProducer("commitTimes");
- public int getTotal() {
- return parseInteger(dbObject.get("total")+"", 0);
+ public int getCount() {
+ return parseInteger(dbObject.get("count")+"", 0);
}
- public Commit setTotal(int total) {
- dbObject.put("total", total);
+ public Commits setCount(int count) {
+ dbObject.put("count", count);
+ notifyChanged();
+ return this;
+ }
+ public int getTotalChanges() {
+ return parseInteger(dbObject.get("totalChanges")+"", 0);
+ }
+
+ public Commits setTotalChanges(int totalChanges) {
+ dbObject.put("totalChanges", totalChanges);
notifyChanged();
return this;
}
@@ -44,7 +58,7 @@
return parseInteger(dbObject.get("additions")+"", 0);
}
- public Commit setAdditions(int additions) {
+ public Commits setAdditions(int additions) {
dbObject.put("additions", additions);
notifyChanged();
return this;
@@ -53,8 +67,26 @@
return parseInteger(dbObject.get("deletions")+"", 0);
}
- public Commit setDeletions(int deletions) {
+ public Commits setDeletions(int deletions) {
dbObject.put("deletions", deletions);
+ notifyChanged();
+ return this;
+ }
+ public int getAsAuthor() {
+ return parseInteger(dbObject.get("asAuthor")+"", 0);
+ }
+
+ public Commits setAsAuthor(int asAuthor) {
+ dbObject.put("asAuthor", asAuthor);
+ notifyChanged();
+ return this;
+ }
+ public int getAsCommitter() {
+ return parseInteger(dbObject.get("asCommitter")+"", 0);
+ }
+
+ public Commits setAsCommitter(int asCommitter) {
+ dbObject.put("asCommitter", asCommitter);
notifyChanged();
return this;
}
@@ -62,7 +94,7 @@
return parseInteger(dbObject.get("totalFiles")+"", 0);
}
- public Commit setTotalFiles(int totalFiles) {
+ public Commits setTotalFiles(int totalFiles) {
dbObject.put("totalFiles", totalFiles);
notifyChanged();
return this;
@@ -71,12 +103,18 @@
return parseDouble(dbObject.get("averageFilesPerCommit")+"", 0.0d);
}
- public Commit setAverageFilesPerCommit(double averageFilesPerCommit) {
+ public Commits setAverageFilesPerCommit(double averageFilesPerCommit) {
dbObject.put("averageFilesPerCommit", averageFilesPerCommit);
notifyChanged();
return this;
}
+ public List<String> getCommitTimes() {
+ if (commitTimes == null) {
+ commitTimes = new PrimitiveList<String>(this, (BasicDBList) dbObject.get("commitTimes"));
+ }
+ return commitTimes;
+ }