Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan E. Cook2016-12-20 18:47:24 +0000
committerDavid W. Miller2016-12-20 18:47:24 +0000
commita3ed93759e71e633865896b8f1301c0bff0fe4f0 (patch)
treef9244aea0db0c28f875e20dd310f0faa15a68424 /plugins/org.eclipse.osee.orcs.db
parentf5ef8eb50135d0b9d67ab4f6d6a456a6302fbed0 (diff)
downloadorg.eclipse.osee-a3ed93759e71e633865896b8f1301c0bff0fe4f0.tar.gz
org.eclipse.osee-a3ed93759e71e633865896b8f1301c0bff0fe4f0.tar.xz
org.eclipse.osee-a3ed93759e71e633865896b8f1301c0bff0fe4f0.zip
refactor: Add Branch Serializer & Deserializer
Change-Id: I6c788057ef0a1f38dede380b183ea101f7706b59 Signed-off-by: Morgan E. Cook <Morgan.e.cook@boeing.com>
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.db')
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/BranchDataImpl.java10
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/TupleQueryImpl.java2
3 files changed, 8 insertions, 8 deletions
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 34556238fd1..d7c6bb5652f 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
@@ -108,7 +108,7 @@ public class CreateBranchDatabaseTxCallable extends JdbcTransaction {
this.newBranchData = branchData;
}
- private void checkPreconditions(JdbcConnection connection, BranchId parentBranch, Long destinationBranch) throws OseeCoreException {
+ private void checkPreconditions(JdbcConnection connection, BranchId parentBranch, BranchId destinationBranch) throws OseeCoreException {
if (newBranchData.getBranchType().isMergeBranch()) {
if (jdbcClient.fetch(connection, 0, TEST_MERGE_BRANCH_EXISTENCE, parentBranch, destinationBranch) > 0) {
throw new OseeStateException("Existing merge branch detected for [%s] and [%d]", parentBranch,
@@ -148,7 +148,7 @@ public class CreateBranchDatabaseTxCallable extends JdbcTransaction {
@Override
public void handleTxWork(JdbcConnection connection) {
BranchId parentBranch = newBranchData.getParentBranch();
- Long destinationBranchUuid = newBranchData.getMergeDestinationBranchId();
+ BranchId destinationBranchUuid = newBranchData.getMergeDestinationBranchId();
checkPreconditions(connection, parentBranch, destinationBranchUuid);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/BranchDataImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/BranchDataImpl.java
index ac45f48dfdb..7911967ee48 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/BranchDataImpl.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/BranchDataImpl.java
@@ -32,15 +32,15 @@ public class BranchDataImpl extends NamedIdBase implements BranchData, BranchRea
private BranchState branchState = BranchState.CREATED;
private BranchType branchType = BranchType.WORKING;
private boolean inheritAccessControl = false;
- private ArtifactId branchView = ArtifactId.SENTINEL;
+ private ArtifactId viewId = ArtifactId.SENTINEL;
public BranchDataImpl(Long branchId, String name) {
this(branchId, name, ArtifactId.SENTINEL);
}
- public BranchDataImpl(Long branchId, String name, ArtifactId branchView) {
+ public BranchDataImpl(Long branchId, String name, ArtifactId viewId) {
super(branchId, name);
- this.branchView = branchView;
+ this.viewId = viewId;
}
@Override
@@ -134,7 +134,7 @@ public class BranchDataImpl extends NamedIdBase implements BranchData, BranchRea
}
@Override
- public ArtifactId getView() {
- return branchView;
+ public ArtifactId getViewId() {
+ return viewId;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/TupleQueryImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/TupleQueryImpl.java
index 499b82aba9e..002cb1180a6 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/TupleQueryImpl.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/TupleQueryImpl.java
@@ -101,7 +101,7 @@ public class TupleQueryImpl implements TupleQuery {
@Override
public <E1, E2> void getTuple2KeyValuePair(Tuple2Type<E1, E2> tupleType, BranchId branch, BiConsumer<Long, String> consumer) {
- runQuery(consumer, SELECT_KEY_VALUE_FROM_BRANCH_VIEW, "e2", branch.getView(), tupleType, branch);
+ runQuery(consumer, SELECT_KEY_VALUE_FROM_BRANCH_VIEW, "e2", branch.getViewId(), tupleType, branch);
}
@Override

Back to the top