Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/branch/AbstractBranchCallable.java')
-rw-r--r--plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/branch/AbstractBranchCallable.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/branch/AbstractBranchCallable.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/branch/AbstractBranchCallable.java
index 3d049b297b1..34edc93b6c0 100644
--- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/branch/AbstractBranchCallable.java
+++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/branch/AbstractBranchCallable.java
@@ -15,7 +15,6 @@ import java.util.concurrent.Callable;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.osee.executor.admin.CancellableCallable;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.CoreBranches;
import org.eclipse.osee.framework.core.enums.CoreTranslatorId;
import org.eclipse.osee.framework.core.translation.IDataTranslationService;
@@ -25,8 +24,10 @@ import org.eclipse.osee.orcs.ApplicationContext;
import org.eclipse.osee.orcs.OrcsApi;
import org.eclipse.osee.orcs.OrcsBranch;
import org.eclipse.osee.orcs.data.ArtifactReadable;
+import org.eclipse.osee.orcs.data.BranchReadable;
import org.eclipse.osee.orcs.search.BranchQuery;
import org.eclipse.osee.orcs.search.QueryFactory;
+import org.eclipse.osee.orcs.search.TransactionQuery;
/**
* @author Roberto E. Escobar
@@ -110,10 +111,14 @@ public abstract class AbstractBranchCallable<REQ_TYPE, RESP_TYPE> extends Cancel
return branchOps;
}
- protected IOseeBranch getBranchFromUuid(long uuid) {
+ protected QueryFactory getQueryFactory() {
+ return orcsApi.getQueryFactory(getContext());
+ }
+
+ protected BranchReadable getBranchFromUuid(long uuid) {
BranchQuery branchQuery = orcsApi.getQueryFactory(getContext()).branchQuery();
branchQuery.andUuids(uuid);
- return branchQuery.getResultsAsId().getExactlyOne();
+ return branchQuery.getResults().getExactlyOne();
}
protected ApplicationContext getContext() {
@@ -129,4 +134,10 @@ public abstract class AbstractBranchCallable<REQ_TYPE, RESP_TYPE> extends Cancel
return artifact;
}
+ protected Long getBranchUuidFromTxId(int tx) {
+ TransactionQuery txQuery = getQueryFactory().transactionQuery();
+ Long branchId = txQuery.andTxId(tx).getResults().getExactlyOne().getBranchId();
+ return branchId;
+ }
+
} \ No newline at end of file

Back to the top