Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Minks2018-06-05 17:45:22 -0400
committerDonald Dunne2018-06-08 10:00:27 -0400
commitcebde0e4766095b0cd7344af8f3e2fad40724822 (patch)
treef9f05dd92f17b6da2158bff50fb124e90a4e3377
parented30858b380689c18f9854b057c964f555c3ece5 (diff)
downloadorg.eclipse.osee-cebde0e4766095b0cd7344af8f3e2fad40724822.tar.gz
org.eclipse.osee-cebde0e4766095b0cd7344af8f3e2fad40724822.tar.xz
org.eclipse.osee-cebde0e4766095b0cd7344af8f3e2fad40724822.zip
refactor: Use OSEE GammaId
Change-Id: Ieed86d7f06442199c5130a22cb00756fa392761b Signed-off-by: Mark Minks <mark.minks@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflict.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflictBuilder.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflictBuilder.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/Conflict.java14
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictBuilder.java7
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictStatusManager.java9
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/RelationConflict.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java21
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExportItemFactory.java11
10 files changed, 39 insertions, 35 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflict.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflict.java
index 4274ba93fa..9a1ef7af4d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflict.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflict.java
@@ -32,7 +32,7 @@ public class ArtifactConflict extends Conflict {
private final ModificationType sourceModType;
private final ModificationType destModType;
- public ArtifactConflict(int sourceGamma, int destGamma, ArtifactId artId, TransactionToken toTransactionId, BranchId mergeBranch, IOseeBranch sourceBranch, IOseeBranch destBranch, ModificationType sourceModType, ModificationType destModType, long artTypeId) {
+ public ArtifactConflict(GammaId sourceGamma, GammaId destGamma, ArtifactId artId, TransactionToken toTransactionId, BranchId mergeBranch, IOseeBranch sourceBranch, IOseeBranch destBranch, ModificationType sourceModType, ModificationType destModType, long artTypeId) {
super(sourceGamma, destGamma, artId, toTransactionId, null, mergeBranch, sourceBranch, destBranch);
this.sourceModType = sourceModType;
this.destModType = destModType;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflictBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflictBuilder.java
index e9b0f88488..11c08137d6 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflictBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflictBuilder.java
@@ -14,6 +14,7 @@ package org.eclipse.osee.framework.skynet.core.conflict;
import java.util.Set;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.ModificationType;
@@ -26,7 +27,7 @@ public class ArtifactConflictBuilder extends ConflictBuilder {
private final ModificationType destModType;
private final long artTypeId;
- public ArtifactConflictBuilder(int sourceGamma, int destGamma, ArtifactId artId, TransactionToken toTransactionId, IOseeBranch sourceBranch, IOseeBranch destBranch, ModificationType sourceModType, ModificationType destModType, long artTypeId) {
+ public ArtifactConflictBuilder(GammaId sourceGamma, GammaId destGamma, ArtifactId artId, TransactionToken toTransactionId, IOseeBranch sourceBranch, IOseeBranch destBranch, ModificationType sourceModType, ModificationType destModType, long artTypeId) {
super(sourceGamma, destGamma, artId, toTransactionId, sourceBranch, destBranch);
this.artTypeId = artTypeId;
this.sourceModType = sourceModType;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java
index c9007cdccf..d017aadd2d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java
@@ -68,7 +68,7 @@ public class AttributeConflict extends Conflict {
private String changeItemName;
- public AttributeConflict(int sourceGamma, int destGamma, ArtifactId artId, TransactionToken toTransactionId, TransactionToken commitTransaction, String sourceValue, AttributeId attrId, AttributeTypeId attributeType, BranchId mergeBranch, IOseeBranch sourceBranch, IOseeBranch destBranch) {
+ public AttributeConflict(GammaId sourceGamma, GammaId destGamma, ArtifactId artId, TransactionToken toTransactionId, TransactionToken commitTransaction, String sourceValue, AttributeId attrId, AttributeTypeId attributeType, BranchId mergeBranch, IOseeBranch sourceBranch, IOseeBranch destBranch) {
super(sourceGamma, destGamma, artId, toTransactionId, commitTransaction, mergeBranch, sourceBranch, destBranch);
this.attrId = attrId;
this.attributeType = attributeType;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflictBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflictBuilder.java
index 7da94d5100..a36795ee51 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflictBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflictBuilder.java
@@ -16,6 +16,7 @@ import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.ConflictStatus;
@@ -34,7 +35,7 @@ public class AttributeConflictBuilder extends ConflictBuilder {
private final AttributeId attrId;
private final AttributeTypeId attrTypeId;
- public AttributeConflictBuilder(int sourceGamma, int destGamma, ArtifactId artId, TransactionToken toTransactionId, IOseeBranch sourceBranch, IOseeBranch destBranch, String sourceValue, AttributeId attrId, AttributeTypeId attrTypeId) {
+ public AttributeConflictBuilder(GammaId sourceGamma, GammaId destGamma, ArtifactId artId, TransactionToken toTransactionId, IOseeBranch sourceBranch, IOseeBranch destBranch, String sourceValue, AttributeId attrId, AttributeTypeId attrTypeId) {
super(sourceGamma, destGamma, artId, toTransactionId, sourceBranch, destBranch);
this.sourceValue = sourceValue;
this.attrId = attrId;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/Conflict.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/Conflict.java
index e93f383fe2..2c9e6231af 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/Conflict.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/Conflict.java
@@ -38,8 +38,8 @@ import org.eclipse.osee.framework.skynet.core.transaction.TransactionManager;
*/
public abstract class Conflict implements Adaptable {
protected ConflictStatus status;
- protected int sourceGamma;
- protected int destGamma;
+ protected GammaId sourceGamma;
+ protected GammaId destGamma;
private final ArtifactId artId;
private final TransactionToken toTransactionId;
private final TransactionToken commitTransactionId;
@@ -53,7 +53,7 @@ public abstract class Conflict implements Adaptable {
private String sourceDiffFile = null;
private String destDiffFile = null;
- protected Conflict(int sourceGamma, int destGamma, ArtifactId artId, TransactionToken toTransactionId, TransactionToken commitTransactionId, BranchId mergeBranch, IOseeBranch sourceBranch, IOseeBranch destBranch) {
+ protected Conflict(GammaId sourceGamma, GammaId destGamma, ArtifactId artId, TransactionToken toTransactionId, TransactionToken commitTransactionId, BranchId mergeBranch, IOseeBranch sourceBranch, IOseeBranch destBranch) {
this.sourceGamma = sourceGamma;
this.destGamma = destGamma;
this.artId = artId;
@@ -108,19 +108,19 @@ public abstract class Conflict implements Adaptable {
return destBranch;
}
- public int getSourceGamma() {
+ public GammaId getSourceGamma() {
return sourceGamma;
}
- public void setSourceGamma(int sourceGamma) {
+ public void setSourceGamma(GammaId sourceGamma) {
this.sourceGamma = sourceGamma;
}
- public int getDestGamma() {
+ public GammaId getDestGamma() {
return destGamma;
}
- public void setDestGamma(int destGamma) {
+ public void setDestGamma(GammaId destGamma) {
this.destGamma = destGamma;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictBuilder.java
index 373a2eabef..159dda7b9b 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictBuilder.java
@@ -14,6 +14,7 @@ package org.eclipse.osee.framework.skynet.core.conflict;
import java.util.Set;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.TransactionToken;
@@ -22,14 +23,14 @@ import org.eclipse.osee.framework.core.data.TransactionToken;
*/
public abstract class ConflictBuilder {
- protected int sourceGamma;
- protected int destGamma;
+ protected GammaId sourceGamma;
+ protected GammaId destGamma;
protected ArtifactId artId;
protected TransactionToken toTransactionId;
protected IOseeBranch sourceBranch;
protected IOseeBranch destBranch;
- public ConflictBuilder(int sourceGamma, int destGamma, ArtifactId artId, TransactionToken toTransactionId, IOseeBranch sourceBranch, IOseeBranch destBranch) {
+ public ConflictBuilder(GammaId sourceGamma, GammaId destGamma, ArtifactId artId, TransactionToken toTransactionId, IOseeBranch sourceBranch, IOseeBranch destBranch) {
super();
this.sourceGamma = sourceGamma;
this.destGamma = destGamma;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictStatusManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictStatusManager.java
index 133626a3bd..e3db82b036 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictStatusManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictStatusManager.java
@@ -12,6 +12,7 @@
package org.eclipse.osee.framework.skynet.core.conflict;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.enums.ConflictStatus;
import org.eclipse.osee.framework.core.enums.ConflictType;
@@ -36,7 +37,7 @@ public class ConflictStatusManager {
private static final String MERGE_BRANCH_GAMMAS =
"UPDATE osee_txs SET gamma_id = ? where (transaction_id, gamma_id) = (SELECT tx.transaction_id, tx.gamma_id FROM osee_txs tx, osee_attribute atr WHERE tx.branch_id = ? AND tx.transaction_id = ? AND atr.gamma_id = tx.gamma_id AND atr.attr_id = ? )";
- public static void setStatus(ConflictStatus status, int sourceGamma, int destGamma, BranchId mergeBranch) {
+ public static void setStatus(ConflictStatus status, GammaId sourceGamma, GammaId destGamma, BranchId mergeBranch) {
JdbcStatement chStmt = ConnectionHandler.getStatement();
//Gammas should be up to date so you can use them to get entry just update the status field.
try {
@@ -47,7 +48,7 @@ public class ConflictStatusManager {
}
}
- public static ConflictStatus computeStatus(int sourceGamma, int destGamma, BranchId branch, Id objectID, int conflictType, ConflictStatus passedStatus, TransactionId transactionId) {
+ public static ConflictStatus computeStatus(GammaId sourceGamma, GammaId destGamma, BranchId branch, Id objectID, int conflictType, ConflictStatus passedStatus, TransactionId transactionId) {
//Check for a value in the table, if there is not one in there then
//add it with an unedited setting and return unedited
//If gammas are out of date, update the gammas and down grade markedMerged to Edited
@@ -59,8 +60,8 @@ public class ConflictStatusManager {
if (chStmt.next()) {
//There was an entry so lets check it and update it.
int intStatus = chStmt.getInt("status");
- if ((chStmt.getInt("source_gamma_id") != sourceGamma || chStmt.getInt(
- "dest_gamma_id") != destGamma) && intStatus != ConflictStatus.COMMITTED.getValue()) {
+ if (sourceGamma.notEqual(chStmt.getLong("source_gamma_id")) || destGamma.notEqual(
+ chStmt.getLong("dest_gamma_id")) && intStatus != ConflictStatus.COMMITTED.getValue()) {
if (intStatus == ConflictStatus.RESOLVED.getValue() || intStatus == ConflictStatus.PREVIOUS_MERGE_APPLIED_SUCCESS.getValue()) {
intStatus = ConflictStatus.OUT_OF_DATE_RESOLVED.getValue();
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/RelationConflict.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/RelationConflict.java
index cf5eb855f9..edef760d72 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/RelationConflict.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/RelationConflict.java
@@ -27,7 +27,7 @@ import org.eclipse.osee.framework.jdk.core.type.Id;
*/
public class RelationConflict extends Conflict {
- public RelationConflict(int sourceGamma, int destGamma, ArtifactId artId, TransactionRecord toTransactionId, IOseeBranch mergeBranch, IOseeBranch sourceBranch, IOseeBranch destBranch) {
+ public RelationConflict(GammaId sourceGamma, GammaId destGamma, ArtifactId artId, TransactionRecord toTransactionId, IOseeBranch mergeBranch, IOseeBranch sourceBranch, IOseeBranch destBranch) {
super(sourceGamma, destGamma, artId, toTransactionId, null, mergeBranch, sourceBranch, destBranch);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java
index dd6ba55cf1..3e94ce12d0 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java
@@ -24,6 +24,7 @@ import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.data.TransactionToken;
@@ -109,10 +110,10 @@ public class ConflictManagerInternal {
if (BranchManager.isArchived(sourceBranch)) {
sourceBranch = null;
}
- AttributeConflict attributeConflict = new AttributeConflict(chStmt.getInt("source_gamma_id"),
- chStmt.getInt("dest_gamma_id"), ArtifactId.valueOf(chStmt.getLong("art_id")), null, commitTransaction,
- chStmt.getString("source_value"), AttributeId.valueOf(chStmt.getInt("attr_id")),
- AttributeTypeId.valueOf(chStmt.getLong("attr_type_id")),
+ AttributeConflict attributeConflict = new AttributeConflict(
+ GammaId.valueOf(chStmt.getLong("source_gamma_id")), GammaId.valueOf(chStmt.getLong("dest_gamma_id")),
+ ArtifactId.valueOf(chStmt.getLong("art_id")), null, commitTransaction, chStmt.getString("source_value"),
+ AttributeId.valueOf(chStmt.getInt("attr_id")), AttributeTypeId.valueOf(chStmt.getLong("attr_type_id")),
BranchId.valueOf(chStmt.getLong("merge_branch_id")), sourceBranch,
BranchManager.getBranchToken(chStmt.getLong("dest_branch_id")));
attributeConflict.setStatus(ConflictStatus.valueOf(chStmt.getInt("status")));
@@ -249,8 +250,8 @@ public class ConflictManagerInternal {
while (chStmt.next()) {
hadEntries = true;
ArtifactId nextArtId = ArtifactId.valueOf(chStmt.getLong("art_id"));
- int sourceGamma = chStmt.getInt("source_gamma");
- int destGamma = chStmt.getInt("dest_gamma");
+ GammaId sourceGamma = GammaId.valueOf(chStmt.getLong("source_gamma"));
+ GammaId destGamma = GammaId.valueOf(chStmt.getLong("dest_gamma"));
ModificationType sourceModType = ModificationType.valueOf(chStmt.getInt("source_mod_type"));
ModificationType destModType = ModificationType.valueOf(chStmt.getInt("dest_mod_type"));
long artTypeId = chStmt.getLong("art_type_id");
@@ -295,8 +296,8 @@ public class ConflictManagerInternal {
while (chStmt.next()) {
AttributeId nextAttrId = AttributeId.valueOf(chStmt.getInt("attr_id"));
ArtifactId artId = ArtifactId.valueOf(chStmt.getLong("art_id"));
- int sourceGamma = chStmt.getInt("source_gamma");
- int destGamma = chStmt.getInt("dest_gamma");
+ GammaId sourceGamma = GammaId.valueOf(chStmt.getLong("source_gamma"));
+ GammaId destGamma = GammaId.valueOf(chStmt.getLong("dest_gamma"));
AttributeTypeId attrTypeId = AttributeTypeId.valueOf(chStmt.getLong("attr_type_id"));
String sourceValue = chStmt.getString("source_value") != null ? chStmt.getString(
"source_value") : chStmt.getString("dest_value");
@@ -320,7 +321,7 @@ public class ConflictManagerInternal {
*
* @return Returns True if the AttributeConflict candidate is really a conflict.
*/
- private static boolean isAttributeConflictValid(int destinationGammaId, BranchId sourceBranch) {
+ private static boolean isAttributeConflictValid(GammaId destinationGammaId, BranchId sourceBranch) {
boolean isValidConflict = true;
// We just need the largest value at first so the complete source branch
// will be searched
@@ -345,7 +346,7 @@ public class ConflictManagerInternal {
/**
* @return Returns True if the destination gamma does not exist on a branch else false if it does.
*/
- private static boolean isAttributeConflictValidOnBranch(int destinationGammaId, BranchId branch, TransactionId endTransaction) {
+ private static boolean isAttributeConflictValidOnBranch(GammaId destinationGammaId, BranchId branch, TransactionId endTransaction) {
String sql =
"SELECT count(1) FROM osee_txs txs WHERE txs.gamma_id = ? AND txs.branch_id = ? AND txs.transaction_id <= ?";
return ConnectionHandler.getJdbcClient().fetch(0, sql, destinationGammaId, branch, endTransaction) == 0;
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExportItemFactory.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExportItemFactory.java
index ebc5d6b390..d819c4d260 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExportItemFactory.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExportItemFactory.java
@@ -13,7 +13,6 @@ package org.eclipse.osee.orcs.db.internal.exchange;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
-import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.OseeData;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
@@ -101,7 +100,7 @@ public class ExportItemFactory {
processTxOptions(options);
- GammaId gammaJoinId = createGammaJoin(getDbService(), branchJoinId, options);
+ int gammaJoinId = createGammaJoin(getDbService(), branchJoinId, options);
items.add(new ManifestExportItem(logger, preferences, items, options));
items.add(new MetadataExportItem(logger, items, getDbService()));
@@ -121,7 +120,7 @@ public class ExportItemFactory {
return items;
}
- private void addItem(List<AbstractExportItem> items, Long branchJoinId, PropertyStore options, GammaId gammaJoinId, ExportItem exportItem, String query) {
+ private void addItem(List<AbstractExportItem> items, Long branchJoinId, PropertyStore options, int gammaJoinId, ExportItem exportItem, String query) {
StringBuilder modifiedQuery = new StringBuilder(query);
Object[] bindData = prepareQuery(exportItem, modifiedQuery, options, branchJoinId, gammaJoinId);
items.add(new DbTableExportItem(getLogger(), getDbService(), getResourceManager(), exportItem,
@@ -136,9 +135,9 @@ public class ExportItemFactory {
}
}
- private GammaId createGammaJoin(JdbcClient jdbcClient, Long branchJoinId, PropertyStore options) {
+ private int createGammaJoin(JdbcClient jdbcClient, Long branchJoinId, PropertyStore options) {
List<Object> bindList = new ArrayList<>();
- GammaId gammaJoinId = GammaId.valueOf(new Random().nextInt());
+ int gammaJoinId = new Random().nextInt();
StringBuilder sql = new StringBuilder(
"INSERT INTO osee_join_id (id, query_id) SELECT DISTINCT(gamma_id), %s FROM osee_join_id, osee_txs txs WHERE query_id=? AND id = txs.branch_id");
bindList.add(branchJoinId);
@@ -158,7 +157,7 @@ public class ExportItemFactory {
return gammaJoinId;
}
- private static Object[] prepareQuery(ExportItem exportItem, StringBuilder query, PropertyStore options, Long branchJoinId, GammaId gammaJionId) {
+ private static Object[] prepareQuery(ExportItem exportItem, StringBuilder query, PropertyStore options, Long branchJoinId, int gammaJionId) {
List<Object> bindData = new ArrayList<>();
if (exportItem.matches(ExportItem.OSEE_ARTIFACT_DATA, ExportItem.OSEE_ATTRIBUTE_DATA,

Back to the top