Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2013-05-20 20:21:46 -0400
committerRoberto E. Escobar2013-07-01 19:46:15 -0400
commit96c660ce7ec6b79cf74b3b8b5d50c39c642703ac (patch)
tree0ed796a2f9b403a45f8b829d1c27ee585f4c28f0
parent058005e5ff599b928076b2fc489f893b655e4465 (diff)
downloadorg.eclipse.osee-96c660ce7ec6b79cf74b3b8b5d50c39c642703ac.tar.gz
org.eclipse.osee-96c660ce7ec6b79cf74b3b8b5d50c39c642703ac.tar.xz
org.eclipse.osee-96c660ce7ec6b79cf74b3b8b5d50c39c642703ac.zip
refactor: Remove extra compareBranch method
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/BranchDataStore.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsBranchImpl.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/BranchDataStoreImpl.java9
3 files changed, 5 insertions, 13 deletions
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/BranchDataStore.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/BranchDataStore.java
index d43ff2df8a..a70b5ae08e 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/BranchDataStore.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/BranchDataStore.java
@@ -14,7 +14,6 @@ import java.net.URI;
import java.util.List;
import java.util.concurrent.Callable;
import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.change.ChangeItem;
@@ -37,8 +36,6 @@ public interface BranchDataStore {
Callable<List<ChangeItem>> compareBranch(String sessionId, TransactionRecord sourceTx, TransactionRecord destinationTx);
- Callable<List<ChangeItem>> compareBranch(String sessionId, Branch branch) throws OseeCoreException;
-
Callable<URI> exportBranch(String sessionId, List<IOseeBranch> branches, PropertyStore options, String exportName);
Callable<URI> importBranch(String sessionId, URI fileToImport, List<IOseeBranch> branches, PropertyStore options);
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsBranchImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsBranchImpl.java
index f0d56a15b3..0e25431617 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsBranchImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsBranchImpl.java
@@ -19,6 +19,7 @@ import org.eclipse.osee.framework.core.data.LazyObject;
import org.eclipse.osee.framework.core.enums.BranchState;
import org.eclipse.osee.framework.core.enums.BranchType;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.ReadableBranch;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.cache.BranchCache;
@@ -95,7 +96,10 @@ public class OrcsBranchImpl implements OrcsBranch {
@Override
public Callable<List<ChangeItem>> compareBranch(IOseeBranch branch) throws OseeCoreException {
- return branchStore.compareBranch(sessionContext.toString(), branchCache.get(branch));
+ Branch fullBranch = branchCache.get(branch);
+ TransactionRecord fromTx = fullBranch.getBaseTransaction();
+ TransactionRecord toTx = txCache.getHeadTransaction(fullBranch);
+ return branchStore.compareBranch(sessionContext.toString(), fromTx, toTx);
}
@Override
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/BranchDataStoreImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/BranchDataStoreImpl.java
index b23f8fea3f..8c479bff93 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/BranchDataStoreImpl.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/BranchDataStoreImpl.java
@@ -17,10 +17,8 @@ import java.util.List;
import java.util.concurrent.Callable;
import org.eclipse.osee.executor.admin.ExecutorAdmin;
import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.core.model.TransactionRecord;
-import org.eclipse.osee.framework.core.model.cache.TransactionCache;
import org.eclipse.osee.framework.core.model.change.ChangeItem;
import org.eclipse.osee.framework.core.services.IOseeCachingService;
import org.eclipse.osee.framework.core.services.IOseeModelFactoryService;
@@ -126,13 +124,6 @@ public class BranchDataStoreImpl implements BranchDataStore {
}
@Override
- public Callable<List<ChangeItem>> compareBranch(String sessionId, Branch branch) throws OseeCoreException {
- TransactionCache txCache = cachingService.getTransactionCache();
- return new CompareDatabaseCallable(logger, dbService, cachingService.getBranchCache(), txCache,
- branch.getBaseTransaction(), txCache.getHeadTransaction(branch), missingChangeItemFactory, sessionId);
- }
-
- @Override
public Callable<URI> exportBranch(String sessionId, List<IOseeBranch> branches, PropertyStore options, String exportName) {
ExportItemFactory factory =
new ExportItemFactory(logger, dbService, cachingService, typeModelService, resourceManager);

Back to the top