Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/TransactionCacheUpdateResponseTest.java6
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/TransactionCacheUpdateResponse.java5
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java5
-rw-r--r--plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/DatabaseTransactionRecordAccessor.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java12
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseCallable.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CompareDatabaseCallable.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java8
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java35
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/CommitTransactionDatabaseTxCallable.java2
12 files changed, 52 insertions, 41 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/TransactionCacheUpdateResponseTest.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/TransactionCacheUpdateResponseTest.java
index f64fa423ed..665287183a 100644
--- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/TransactionCacheUpdateResponseTest.java
+++ b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/data/TransactionCacheUpdateResponseTest.java
@@ -15,11 +15,8 @@ import java.util.List;
import org.eclipse.osee.framework.core.message.TransactionCacheUpdateResponse;
import org.eclipse.osee.framework.core.message.test.mocks.DataAsserts;
import org.eclipse.osee.framework.core.message.test.mocks.MockDataFactory;
-import org.eclipse.osee.framework.core.message.test.mocks.MockOseeDataAccessor;
-import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.TransactionRecordFactory;
-import org.eclipse.osee.framework.core.model.cache.BranchCache;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Compare;
import org.junit.Assert;
@@ -53,8 +50,7 @@ public class TransactionCacheUpdateResponseTest {
}
TransactionRecordFactory factory = new TransactionRecordFactory();
- BranchCache branchCache = new BranchCache(new MockOseeDataAccessor<Long, Branch>());
- TransactionCacheUpdateResponse response = TransactionCacheUpdateResponse.fromCache(factory, data, branchCache);
+ TransactionCacheUpdateResponse response = TransactionCacheUpdateResponse.fromCache(factory, data);
List<TransactionRecord> actual = response.getTxRows();
Assert.assertEquals(data.size(), actual.size());
for (int index = 0; index < data.size(); index++) {
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/TransactionCacheUpdateResponse.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/TransactionCacheUpdateResponse.java
index e5f2593151..7b2bd95472 100644
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/TransactionCacheUpdateResponse.java
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/TransactionCacheUpdateResponse.java
@@ -15,7 +15,6 @@ import java.util.Collection;
import java.util.List;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.TransactionRecordFactory;
-import org.eclipse.osee.framework.core.model.cache.BranchCache;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
/**
@@ -33,11 +32,11 @@ public class TransactionCacheUpdateResponse {
return rows;
}
- public static TransactionCacheUpdateResponse fromCache(TransactionRecordFactory factory, Collection<TransactionRecord> types, BranchCache branchCache) throws OseeCoreException {
+ public static TransactionCacheUpdateResponse fromCache(TransactionRecordFactory factory, Collection<TransactionRecord> types) throws OseeCoreException {
List<TransactionRecord> rows = new ArrayList<TransactionRecord>();
for (TransactionRecord tx : types) {
rows.add(factory.create(tx.getId(), tx.getBranchId(), tx.getComment(), tx.getTimeStamp(), tx.getAuthor(),
- tx.getCommit(), tx.getTxType(), branchCache));
+ tx.getCommit(), tx.getTxType(), null));
}
return new TransactionCacheUpdateResponse(rows);
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java
index b53f4aec13..017a4b8e89 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecordFactory.java
@@ -24,9 +24,9 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions;
*/
public class TransactionRecordFactory implements IOseeTypeFactory {
- public TransactionRecord create(int transactionNumber, IOseeBranch branch, String comment, Date timestamp, int authorArtId, int commitArtId, TransactionDetailsType txType, BranchCache branchCache) throws OseeCoreException {
+ public TransactionRecord create(int transactionNumber, IOseeBranch branch, String comment, Date timestamp, int authorArtId, int commitArtId, TransactionDetailsType txType) throws OseeCoreException {
return this.create(transactionNumber, branch.getUuid(), comment, timestamp, authorArtId, commitArtId, txType,
- branchCache);
+ null);
}
public TransactionRecord create(int transactionNumber, long branchUuid, String comment, Date timestamp, int authorArtId, int commitArtId, TransactionDetailsType txType, BranchCache branchCache) throws OseeCoreException {
@@ -35,7 +35,6 @@ public class TransactionRecordFactory implements IOseeTypeFactory {
}
private TransactionRecord create(int transactionNumber, BranchCache branchCache) throws OseeCoreException {
- Conditions.checkNotNull(branchCache, "branchCache");
return new TransactionRecord(transactionNumber, branchCache);
}
diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java
index c790fe56d5..2e60a1003e 100644
--- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java
+++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java
@@ -237,8 +237,7 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet {
record.add(txCache.getOrLoad(item));
}
}
- response =
- TransactionCacheUpdateResponse.fromCache(factoryService.getTransactionFactory(), record, branchCache);
+ response = TransactionCacheUpdateResponse.fromCache(factoryService.getTransactionFactory(), record);
transalatorId = CoreTranslatorId.TX_CACHE_UPDATE_RESPONSE;
break;
case ARTIFACT_TYPE_CACHE:
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/DatabaseTransactionRecordAccessor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/DatabaseTransactionRecordAccessor.java
index f48b8e81dc..74e57916d7 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/DatabaseTransactionRecordAccessor.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/DatabaseTransactionRecordAccessor.java
@@ -117,7 +117,7 @@ public class DatabaseTransactionRecordAccessor implements ITransactionDataAccess
chStmt.runPreparedQuery(expectedCount, SELECT_NON_EXISTING_TRANSACTIONS_BY_QUERY_ID, queryId);
while (chStmt.next()) {
int transactionNumber = chStmt.getInt("id");
- factory.getOrCreate(cache, transactionNumber, branchCache);
+ factory.getOrCreate(cache, transactionNumber, null);
}
} finally {
chStmt.close();
@@ -159,7 +159,7 @@ public class DatabaseTransactionRecordAccessor implements ITransactionDataAccess
private TransactionRecord prepareTransactionRecord(TransactionCache cache, int transactionNumber, long branchUuid, String comment, Date timestamp, int authorArtId, int commitArtId, TransactionDetailsType txType) throws OseeCoreException {
TransactionRecord record =
factory.createOrUpdate(cache, transactionNumber, branchUuid, comment, timestamp, authorArtId, commitArtId,
- txType, branchCache);
+ txType, null);
record.clearDirty();
return record;
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java
index f82d13c975..70d5f2ea21 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java
@@ -112,9 +112,8 @@ public final class BranchCopyTxCallable extends AbstractDatastoreTxCallable<Bran
TransactionDetailsType.NonBaselined.getId());
TransactionRecord record =
- txFactory.create(nextTransactionId, internalBranch.getUuid(), creationComment, timestamp,
- branchData.getUserArtifactId(), RelationalConstants.ART_ID_SENTINEL, TransactionDetailsType.Baselined,
- branchCache);
+ txFactory.create(nextTransactionId, internalBranch, creationComment, timestamp,
+ branchData.getUserArtifactId(), RelationalConstants.ART_ID_SENTINEL, TransactionDetailsType.Baselined);
txCache.cache(record);
@@ -158,7 +157,12 @@ public final class BranchCopyTxCallable extends AbstractDatastoreTxCallable<Bran
if (!gammas.contains(gamma)) {
ModificationType modType = ModificationType.getMod(chStmt.getInt("mod_type"));
TxChange txCurrent = TxChange.getCurrent(modType);
- data.add(new Object[] {baseTxId, gamma, modType.getValue(), txCurrent.getValue(), internalBranch.getUuid()});
+ data.add(new Object[] {
+ baseTxId,
+ gamma,
+ modType.getValue(),
+ txCurrent.getValue(),
+ internalBranch.getUuid()});
gammas.add(gamma);
}
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseCallable.java
index 953d76a70a..a67a265a11 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseCallable.java
@@ -96,8 +96,7 @@ public class CommitBranchDatabaseCallable extends AbstractDatastoreCallable<Tran
Callable<List<ChangeItem>> loadChanges =
new LoadDeltasBetweenBranches(getLogger(), getSession(), getDatabaseService(), source.getUuid(),
- source.getBaseTransaction().getId(), destinationTx.getBranchId(), destinationTx.getId(), mergeBranchId,
- mergeTxId);
+ destinationTx.getBranchId(), destinationTx.getId(), mergeBranchId, mergeTxId);
List<ChangeItem> changes = callAndCheckForCancel(loadChanges);
changes.addAll(missingChangeItemFactory.createMissingChanges(this, getSession(), changes, sourceTx, destinationTx));
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java
index 662e07fed6..66c95ccfe4 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java
@@ -162,8 +162,8 @@ public class CommitBranchDatabaseTxCallable extends AbstractDatastoreTxCallable<
TransactionDetailsType.NonBaselined.getId(), destinationBranch.getUuid(), newTransactionNumber, comment,
timestamp, userArtId, sourceBranch.getAssociatedArtifactId());
TransactionRecord record =
- txFactory.create(newTransactionNumber, destinationBranch.getUuid(), comment, timestamp, userArtId,
- sourceBranch.getAssociatedArtifactId(), TransactionDetailsType.NonBaselined, branchCache);
+ txFactory.create(newTransactionNumber, destinationBranch, comment, timestamp, userArtId,
+ sourceBranch.getAssociatedArtifactId(), TransactionDetailsType.NonBaselined);
return record;
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CompareDatabaseCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CompareDatabaseCallable.java
index 4008ada227..b67d813883 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CompareDatabaseCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CompareDatabaseCallable.java
@@ -37,6 +37,9 @@ public class CompareDatabaseCallable extends AbstractDatastoreCallable<List<Chan
private final TransactionRecord destinationTx;
private final MissingChangeItemFactory missingChangeItemFactory;
+ private static final String SELECT_BASE_TRANSACTION =
+ "select baseline_transaction_id from osee_branch where branch_id = ?";
+
public CompareDatabaseCallable(Log logger, OrcsSession session, IOseeDatabaseService service, BranchCache branchCache, TransactionCache txCache, TransactionRecord sourceTx, TransactionRecord destinationTx, MissingChangeItemFactory missingChangeItemFactory) {
super(logger, session, service);
this.branchCache = branchCache;
@@ -71,8 +74,7 @@ public class CompareDatabaseCallable extends AbstractDatastoreCallable<List<Chan
}
callable =
new LoadDeltasBetweenBranches(getLogger(), getSession(), getDatabaseService(), sourceTx.getBranchId(),
- sourceTx.getFullBranch().getBaseTransaction().getId(), destinationTx.getBranchId(),
- destinationTx.getId(), mergeBranchId, mergeTxId);
+ destinationTx.getBranchId(), destinationTx.getId(), mergeBranchId, mergeTxId);
}
List<ChangeItem> changes = callAndCheckForCancel(callable);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java
index bf4f5f8e91..fef3437018 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java
@@ -192,8 +192,8 @@ public class CreateBranchDatabaseTxCallable extends AbstractDatastoreTxCallable<
if (branch.getBranchType().isSystemRootBranch()) {
TransactionRecord systemTx =
- txFactory.create(nextTransactionId, uuid, newBranchData.getCreationComment(), timestamp,
- newBranchData.getUserArtifactId(), -1, TransactionDetailsType.Baselined, branchCache);
+ txFactory.create(nextTransactionId, branch, newBranchData.getCreationComment(), timestamp,
+ newBranchData.getUserArtifactId(), -1, TransactionDetailsType.Baselined);
branch.setSourceTransaction(systemTx);
} else {
int srcTx = IdUtil.getSourceTxId(newBranchData, txCache);
@@ -218,8 +218,8 @@ public class CreateBranchDatabaseTxCallable extends AbstractDatastoreTxCallable<
TransactionDetailsType.Baselined.getId());
TransactionRecord record =
- txFactory.create(nextTransactionId, branch.getUuid(), newBranchData.getCreationComment(), timestamp,
- newBranchData.getUserArtifactId(), -1, TransactionDetailsType.Baselined, branchCache);
+ txFactory.create(nextTransactionId, branch, newBranchData.getCreationComment(), timestamp,
+ newBranchData.getUserArtifactId(), -1, TransactionDetailsType.Baselined);
if (branch.getBranchType().isSystemRootBranch()) {
branch.setSourceTransaction(record);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java
index 5d8bbd4407..3c726a8f07 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java
@@ -30,6 +30,7 @@ import org.eclipse.osee.logger.Log;
import org.eclipse.osee.orcs.OrcsSession;
import org.eclipse.osee.orcs.db.internal.callable.AbstractDatastoreCallable;
import org.eclipse.osee.orcs.db.internal.change.ChangeItemLoader.ChangeItemFactory;
+import org.eclipse.osee.orcs.db.internal.sql.RelationalConstants;
/**
* @author Ryan D. Brooks
@@ -41,17 +42,19 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch
private static final String SELECT_SOURCE_BRANCH_CHANGES =
"select gamma_id, mod_type from osee_txs txs where txs.branch_id = ? and txs.tx_current <> ? and txs.transaction_id <> ? AND NOT EXISTS (SELECT 1 FROM osee_txs txs1 WHERE txs1.branch_id = ? AND txs1.transaction_id = ? AND txs1.gamma_id = txs.gamma_id and txs1.mod_type = txs.mod_type)";
+ private static final String SELECT_BASE_TRANSACTION =
+ "select baseline_transaction_id from osee_branch where branch_id = ?";
+
private final HashMap<Long, ModificationType> changeByGammaId = new HashMap<Long, ModificationType>();
private final Long sourceBranchId, destinationBranchId, mergeBranchId;
- private final Integer sourceBaselineTxId, destinationHeadTxId, mergeTxId;
+ private final Integer destinationHeadTxId, mergeTxId;
private final ChangeItemLoader changeItemLoader;
- public LoadDeltasBetweenBranches(Log logger, OrcsSession session, IOseeDatabaseService dbService, Long sourceBranchId, Integer sourceBaselineTxId, Long destinationBranchId, Integer destinationHeadTxId, Long mergeBranchId, Integer mergeTxId) {
+ public LoadDeltasBetweenBranches(Log logger, OrcsSession session, IOseeDatabaseService dbService, Long sourceBranchId, Long destinationBranchId, Integer destinationHeadTxId, Long mergeBranchId, Integer mergeTxId) {
super(logger, session, dbService);
this.sourceBranchId = sourceBranchId;
- this.sourceBaselineTxId = sourceBaselineTxId;
this.destinationBranchId = destinationBranchId;
this.destinationHeadTxId = destinationHeadTxId;
this.mergeBranchId = mergeBranchId;
@@ -63,6 +66,10 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch
return mergeBranchId != null;
}
+ private int getSourceBaselineTxId() {
+ return getBaseTxId(sourceBranchId);
+ }
+
@Override
public List<ChangeItem> call() throws Exception {
List<ChangeItem> changeData = new LinkedList<ChangeItem>();
@@ -71,14 +78,15 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch
"Unable to compute deltas between transactions on the same branch [%s]", sourceBranchId);
TransactionJoinQuery txJoin = JoinUtility.createTransactionJoinQuery();
+ int sourceBaselineTxId = getSourceBaselineTxId();
- loadSourceBranchChanges(txJoin);
+ loadSourceBranchChanges(txJoin, sourceBaselineTxId);
int txJoinId = txJoin.getQueryId();
try {
- loadByItemId(changeData, txJoinId, changeItemLoader.createArtifactChangeItemFactory());
- loadByItemId(changeData, txJoinId, changeItemLoader.createAttributeChangeItemFactory());
- loadByItemId(changeData, txJoinId, changeItemLoader.createRelationChangeItemFactory());
+ loadByItemId(changeData, txJoinId, changeItemLoader.createArtifactChangeItemFactory(), sourceBaselineTxId);
+ loadByItemId(changeData, txJoinId, changeItemLoader.createAttributeChangeItemFactory(), sourceBaselineTxId);
+ loadByItemId(changeData, txJoinId, changeItemLoader.createRelationChangeItemFactory(), sourceBaselineTxId);
} finally {
try {
txJoin.delete();
@@ -89,7 +97,7 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch
return changeData;
}
- private void loadSourceBranchChanges(TransactionJoinQuery txJoin) throws OseeCoreException {
+ private void loadSourceBranchChanges(TransactionJoinQuery txJoin, int sourceBaselineTxId) throws OseeCoreException {
IOseeStatement chStmt = getDatabaseService().getStatement();
try {
chStmt.runPreparedQuery(MAX_FETCH, SELECT_SOURCE_BRANCH_CHANGES, sourceBranchId,
@@ -108,7 +116,7 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch
}
}
- private void loadByItemId(Collection<ChangeItem> changeData, int txJoinId, ChangeItemFactory factory) throws OseeCoreException {
+ private void loadByItemId(Collection<ChangeItem> changeData, int txJoinId, ChangeItemFactory factory, int sourceBaselineTxId) throws OseeCoreException {
HashMap<Integer, ChangeItem> changesByItemId = new HashMap<Integer, ChangeItem>();
IdJoinQuery idJoin = JoinUtility.createIdJoinQuery();
@@ -126,7 +134,7 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch
destinationBranchId, destinationHeadTxId, false);
loadNonCurrentSourceData(factory.getItemTableName(), factory.getItemIdColumnName(), idJoin, changesByItemId,
- factory.getItemValueColumnName());
+ factory.getItemValueColumnName(), sourceBaselineTxId);
changeData.addAll(changesByItemId.values());
} finally {
@@ -164,7 +172,7 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch
}
}
- private void loadNonCurrentSourceData(String tableName, String idColumnName, IdJoinQuery idJoin, HashMap<Integer, ChangeItem> changesByItemId, String columnValueName) throws OseeCoreException {
+ private void loadNonCurrentSourceData(String tableName, String idColumnName, IdJoinQuery idJoin, HashMap<Integer, ChangeItem> changesByItemId, String columnValueName, int sourceBaselineTxId) throws OseeCoreException {
IOseeStatement chStmt = getDatabaseService().getStatement();
String query;
@@ -219,4 +227,9 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch
}
}
+ private int getBaseTxId(long branchId) throws OseeCoreException {
+ return getDatabaseService().runPreparedQueryFetchObject(RelationalConstants.TRANSACTION_SENTINEL,
+ SELECT_BASE_TRANSACTION, branchId);
+ }
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/CommitTransactionDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/CommitTransactionDatabaseTxCallable.java
index c0f24539cc..7c4937b434 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/CommitTransactionDatabaseTxCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/CommitTransactionDatabaseTxCallable.java
@@ -117,7 +117,7 @@ public final class CommitTransactionDatabaseTxCallable extends AbstractDatastore
Date transactionTime = GlobalTime.GreenwichMeanTimestamp();
return factory.create(transactionNumber, branch, comment, transactionTime, authorArtId,
- RelationalConstants.ART_ID_SENTINEL, txType, branchCache);
+ RelationalConstants.ART_ID_SENTINEL, txType);
}
private static final class TransactionResultImpl implements TransactionResult {

Back to the top