Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjphillips2012-03-14 16:51:08 -0400
committerRyan D. Brooks2012-03-14 16:51:08 -0400
commitb7bc50bc92539bb9f14d2fb1e3b2deaa06918879 (patch)
tree7924bdc1e0c062f5d5c2ac1662c2b77142d0a52c /plugins/org.eclipse.osee.framework.core.message/src/org
parent8ab0b5b90e8aa75215e0769fee22733a42ab881c (diff)
downloadorg.eclipse.osee-b7bc50bc92539bb9f14d2fb1e3b2deaa06918879.tar.gz
org.eclipse.osee-b7bc50bc92539bb9f14d2fb1e3b2deaa06918879.tar.xz
org.eclipse.osee-b7bc50bc92539bb9f14d2fb1e3b2deaa06918879.zip
refactor: Replace with baseline version
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.message/src/org')
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeItem.java19
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/ChangeReportResponseTranslator.java5
2 files changed, 19 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeItem.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeItem.java
index da18ea788e..e667243a2d 100644
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeItem.java
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/ChangeItem.java
@@ -26,8 +26,9 @@ public abstract class ChangeItem {
private final ChangeVersion destinationEntry;
private final ChangeVersion netEntry;
+ private boolean synthetic;
+
protected ChangeItem(int itemId, int itemTypeId, int artId, long currentSourceGammaId, ModificationType currentSourceModType) {
- super();
this.itemId = itemId;
this.itemTypeId = itemTypeId;
this.artId = artId;
@@ -38,6 +39,16 @@ public abstract class ChangeItem {
this.firstChange = new ChangeVersion();
this.destinationEntry = new ChangeVersion();
this.netEntry = new ChangeVersion();
+
+ this.synthetic = false;
+ }
+
+ public void setSynthetic(boolean synthetic) {
+ this.synthetic = synthetic;
+ }
+
+ public boolean isSynthetic() {
+ return synthetic;
}
public int getArtId() {
@@ -75,8 +86,8 @@ public abstract class ChangeItem {
@Override
public String toString() {
return String.format(
- "ChangeItem - itemId:[%s] artId:%s typeId:%s base:%s first:%s current:%s destination:%s net:%s", itemId,
- getArtId(), getItemTypeId(), getBaselineVersion(), getFirstNonCurrentChange(), getCurrentVersion(),
- getDestinationVersion(), getNetChange());
+ "ChangeItem - itemId:[%s] artId:%s typeId:%s base:%s first:%s current:%s destination:%s net:%s synthetic:%s",
+ itemId, getArtId(), getItemTypeId(), getBaselineVersion(), getFirstNonCurrentChange(), getCurrentVersion(),
+ getDestinationVersion(), getNetChange(), isSynthetic());
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/ChangeReportResponseTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/ChangeReportResponseTranslator.java
index a3bc2a9a38..bd06e5840e 100644
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/ChangeReportResponseTranslator.java
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/ChangeReportResponseTranslator.java
@@ -115,10 +115,11 @@ public class ChangeReportResponseTranslator implements ITranslator<ChangeReportR
private static String[] toArray(ChangeItem item) throws OseeStateException {
String[] row;
if (item instanceof ArtifactChangeItem) {
- row = new String[3];
+ row = new String[4];
row[0] = ChangeItemType.ARTIFACT.name();
row[1] = String.valueOf(item.getItemId());
row[2] = String.valueOf(item.getItemTypeId());
+ row[3] = String.valueOf(item.isSynthetic());
} else if (item instanceof AttributeChangeItem) {
row = new String[4];
row[0] = ChangeItemType.ATTRIBUTE.name();
@@ -149,7 +150,9 @@ public class ChangeReportResponseTranslator implements ITranslator<ChangeReportR
int itemTypeId = Integer.parseInt(row[2]);
switch (type) {
case ARTIFACT:
+ boolean synthetic = Boolean.parseBoolean(row[3]);
changeItem = new ArtifactChangeItem(itemId, itemTypeId, -1, ModificationType.NEW);
+ changeItem.setSynthetic(synthetic);
break;
case ATTRIBUTE:
int artId = Integer.parseInt(row[3]);

Back to the top