| author | David W. Miller | 2012-05-09 16:52:14 (EDT) |
|---|---|---|
| committer | Roberto E. Escobar | 2012-05-09 16:52:14 (EDT) |
| commit | 3ea748c1c57c1e373452b123c67ac717402836b8 (patch) (side-by-side diff) | |
| tree | 84145fab76e2b0a307187fcd1883315fc34c8cf9 | |
| parent | c66946170431321ec20e8746e085718b27e6f391 (diff) | |
| download | org.eclipse.osee-3ea748c1c57c1e373452b123c67ac717402836b8.zip org.eclipse.osee-3ea748c1c57c1e373452b123c67ac717402836b8.tar.gz org.eclipse.osee-3ea748c1c57c1e373452b123c67ac717402836b8.tar.bz2 | |
refactor: Rename method and parameter in merge branch creation
13 files changed, 74 insertions, 78 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/DataAsserts.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/DataAsserts.java index 6aed437..0c16ec2 100644 --- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/DataAsserts.java +++ b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/DataAsserts.java @@ -182,10 +182,10 @@ public final class DataAsserts { Assert.assertEquals(expected.getBranchGuid(), actual.getBranchGuid()); Assert.assertEquals(expected.getBranchName(), actual.getBranchName()); Assert.assertEquals(expected.getCreationComment(), actual.getCreationComment()); - Assert.assertEquals(expected.getDestinationBranchId(), actual.getDestinationBranchId()); + Assert.assertEquals(expected.getMergeDestinationBranchId(), actual.getMergeDestinationBranchId()); Assert.assertEquals(expected.getParentBranchId(), actual.getParentBranchId()); - Assert.assertEquals(expected.getPopulateBaseTxFromAddressingQueryId(), - actual.getPopulateBaseTxFromAddressingQueryId()); + Assert.assertEquals(expected.getMergeAddressingQueryId(), + actual.getMergeAddressingQueryId()); Assert.assertEquals(expected.getSourceTransactionId(), actual.getSourceTransactionId()); Assert.assertEquals(expected.getBranchType(), actual.getBranchType()); } diff --git a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/MockRequestFactory.java b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/MockRequestFactory.java index 07c4cfe..e829548 100644 --- a/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/MockRequestFactory.java +++ b/plugins/org.eclipse.osee.framework.core.message.test/src/org/eclipse/osee/framework/core/message/test/mocks/MockRequestFactory.java @@ -91,11 +91,11 @@ public final class MockRequestFactory { String creationComment = "creation_comment_" + index; - int populateBaseTxFromAddressingQueryId = -1; + int mergeFromAddressingQueryId = -1; int destinationBranchId = -1; return new BranchCreationRequest(branchType, sourceTransactionId, parentBranchId, branchGuid, branchName, - associatedArtifactId, authorId, creationComment, populateBaseTxFromAddressingQueryId, destinationBranchId); + associatedArtifactId, authorId, creationComment, mergeFromAddressingQueryId, destinationBranchId); } public static Object createBranchCreateResponse(int index) { diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCreationRequest.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCreationRequest.java index f40e0bb..8bad7d5 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCreationRequest.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/BranchCreationRequest.java @@ -27,10 +27,10 @@ public class BranchCreationRequest { private final int authorId; private final String creationComment; - private final int populateBaseTxFromAddressingQueryId; - private final int destinationBranchId; + private final int mergeAddressingQueryId; + private final int mergeDestinationBranchId; - public BranchCreationRequest(BranchType branchType, int sourceTransactionId, int parentBranchId, String branchGuid, String branchName, int associatedArtifactId, int authorId, String creationComment, int populateBaseTxFromAddressingQueryId, int destinationBranchId) { + public BranchCreationRequest(BranchType branchType, int sourceTransactionId, int parentBranchId, String branchGuid, String branchName, int associatedArtifactId, int authorId, String creationComment, int mergeAddressingQueryId, int destinationBranchId) { this.parentBranchId = parentBranchId; this.branchName = branchName; this.associatedArtifactId = associatedArtifactId; @@ -39,8 +39,8 @@ public class BranchCreationRequest { this.branchGuid = branchGuid; this.authorId = authorId; this.creationComment = creationComment; - this.populateBaseTxFromAddressingQueryId = populateBaseTxFromAddressingQueryId; - this.destinationBranchId = destinationBranchId; + this.mergeAddressingQueryId = mergeAddressingQueryId; + this.mergeDestinationBranchId = destinationBranchId; } public String getBranchName() { @@ -75,12 +75,12 @@ public class BranchCreationRequest { return creationComment; } - public int getPopulateBaseTxFromAddressingQueryId() { - return populateBaseTxFromAddressingQueryId; + public int getMergeAddressingQueryId() { + return mergeAddressingQueryId; } - public int getDestinationBranchId() { - return destinationBranchId; + public int getMergeDestinationBranchId() { + return mergeDestinationBranchId; } @Override diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchCreationRequestTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchCreationRequestTranslator.java index f624a76..9949cf0 100644 --- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchCreationRequestTranslator.java +++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/BranchCreationRequestTranslator.java @@ -32,8 +32,8 @@ public class BranchCreationRequestTranslator implements ITranslator<BranchCreati AUTHOR_ID, CREATION_COMMENT, - POPULATE_BASE_TX_FROM_ADDR_QUERY_ID, - DESTINATION_BRANCH_ID; + MERGE_ADDRESSING_QUERY_ID, + MERGE_DESTINATION_BRANCH_ID; } @Override @@ -50,11 +50,11 @@ public class BranchCreationRequestTranslator implements ITranslator<BranchCreati String creationComment = store.get(Fields.CREATION_COMMENT.name()); - int populateBaseTxFromAddressingQueryId = store.getInt(Fields.POPULATE_BASE_TX_FROM_ADDR_QUERY_ID.name()); - int destinationBranchId = store.getInt(Fields.DESTINATION_BRANCH_ID.name()); + int mergeAddressingQueryId = store.getInt(Fields.MERGE_ADDRESSING_QUERY_ID.name()); + int destinationBranchId = store.getInt(Fields.MERGE_DESTINATION_BRANCH_ID.name()); return new BranchCreationRequest(branchType, sourceTransactionId, parentBranchId, branchGuid, branchName, - associatedArtifactId, authorId, creationComment, populateBaseTxFromAddressingQueryId, destinationBranchId); + associatedArtifactId, authorId, creationComment, mergeAddressingQueryId, destinationBranchId); } @Override @@ -69,8 +69,8 @@ public class BranchCreationRequestTranslator implements ITranslator<BranchCreati store.put(Fields.AUTHOR_ID.name(), object.getAuthorId()); store.put(Fields.CREATION_COMMENT.name(), object.getCreationComment()); - store.put(Fields.POPULATE_BASE_TX_FROM_ADDR_QUERY_ID.name(), object.getPopulateBaseTxFromAddressingQueryId()); - store.put(Fields.DESTINATION_BRANCH_ID.name(), object.getDestinationBranchId()); + store.put(Fields.MERGE_ADDRESSING_QUERY_ID.name(), object.getMergeAddressingQueryId()); + store.put(Fields.MERGE_DESTINATION_BRANCH_ID.name(), object.getMergeDestinationBranchId()); return store; } diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/branch/CreateBranchCallable.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/branch/CreateBranchCallable.java index 61587c8..29b3d98 100644 --- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/branch/CreateBranchCallable.java +++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/branch/CreateBranchCallable.java @@ -51,8 +51,8 @@ public class CreateBranchCallable extends AbstractBranchCallable<BranchCreationR createData.setUserArtifact(createdBy); createData.setAssociatedArtifact(associatedWith); - createData.setDestinationBranchId(request.getDestinationBranchId()); - createData.setPopulateBaseTxFromAddressingQueryId(request.getPopulateBaseTxFromAddressingQueryId()); + createData.setMergeDestinationBranchId(request.getMergeDestinationBranchId()); + createData.setMergeAddressingQueryId(request.getMergeAddressingQueryId()); Callable<ReadableBranch> callable = getBranchOps().createBranch(createData); ReadableBranch newBranch = callAndCheckForCancel(callable); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java index 911fdc3..2edf304 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java @@ -320,15 +320,10 @@ public class BranchManager { private static MergeBranch createMergeBranch(final Branch sourceBranch, final Branch destBranch, final ArrayList<Integer> expectedArtIds) throws OseeCoreException { Timestamp insertTime = GlobalTime.GreenwichMeanTimestamp(); - int populateBaseTxFromAddressingQueryId = ArtifactLoader.getNewQueryId(); + int mergeAddressingQueryId = ArtifactLoader.getNewQueryId(); List<Object[]> datas = new LinkedList<Object[]>(); for (int artId : expectedArtIds) { - datas.add(new Object[] { - populateBaseTxFromAddressingQueryId, - insertTime, - artId, - sourceBranch.getId(), - SQL3DataType.INTEGER}); + datas.add(new Object[] {mergeAddressingQueryId, insertTime, artId, sourceBranch.getId(), SQL3DataType.INTEGER}); } MergeBranch mergeBranch = null; try { @@ -341,11 +336,11 @@ public class BranchManager { String branchName = "Merge " + sourceBranch.getShortName() + " <=> " + destBranch.getShortName(); mergeBranch = (MergeBranch) createBranch(BranchType.MERGE, sourceBranch.getBaseTransaction(), branchName, null, - UserManager.getUser(), creationComment, populateBaseTxFromAddressingQueryId, destBranch.getId()); + UserManager.getUser(), creationComment, mergeAddressingQueryId, destBranch.getId()); mergeBranch.setSourceBranch(sourceBranch); mergeBranch.setDestinationBranch(destBranch); } finally { - ArtifactLoader.clearQuery(populateBaseTxFromAddressingQueryId); + ArtifactLoader.clearQuery(mergeAddressingQueryId); } return mergeBranch; } @@ -403,10 +398,10 @@ public class BranchManager { associatedArtifact, creationComment, -1, -1); } - private static Branch createBranch(BranchType branchType, TransactionRecord parentTransaction, String branchName, String branchGuid, Artifact associatedArtifact, String creationComment, int populateBaseTxFromAddressingQueryId, int destinationBranchId) throws OseeCoreException { + private static Branch createBranch(BranchType branchType, TransactionRecord parentTransaction, String branchName, String branchGuid, Artifact associatedArtifact, String creationComment, int mergeAddressingQueryId, int destinationBranchId) throws OseeCoreException { CreateBranchHttpRequestOperation operation = new CreateBranchHttpRequestOperation(branchType, parentTransaction, branchName, branchGuid, - associatedArtifact, creationComment, populateBaseTxFromAddressingQueryId, destinationBranchId); + associatedArtifact, creationComment, mergeAddressingQueryId, destinationBranchId); Operations.executeWorkAndCheckStatus(operation); return operation.getNewBranch(); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java index c245697..d424915 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CreateBranchHttpRequestOperation.java @@ -45,11 +45,11 @@ public final class CreateBranchHttpRequestOperation extends AbstractOperation { private final String branchGuid; private final Artifact associatedArtifact; private final String creationComment; - private final int populateBaseTxFromAddressingQueryId; + private final int mergeAddressingQueryId; private final int destinationBranchId; private Branch newBranch; - public CreateBranchHttpRequestOperation(BranchType branchType, TransactionRecord parentTransaction, String branchName, String branchGuid, Artifact associatedArtifact, String creationComment, int populateBaseTxFromAddressingQueryId, int destinationBranchId) { + public CreateBranchHttpRequestOperation(BranchType branchType, TransactionRecord parentTransaction, String branchName, String branchGuid, Artifact associatedArtifact, String creationComment, int mergeAddressingQueryId, int destinationBranchId) { super("Create branch " + branchName, Activator.PLUGIN_ID); this.branchType = branchType; this.parentTransaction = parentTransaction; @@ -57,7 +57,7 @@ public final class CreateBranchHttpRequestOperation extends AbstractOperation { this.branchGuid = branchGuid; this.associatedArtifact = associatedArtifact; this.creationComment = creationComment; - this.populateBaseTxFromAddressingQueryId = populateBaseTxFromAddressingQueryId; + this.mergeAddressingQueryId = mergeAddressingQueryId; this.destinationBranchId = destinationBranchId; } @@ -69,7 +69,7 @@ public final class CreateBranchHttpRequestOperation extends AbstractOperation { BranchCreationRequest request = new BranchCreationRequest(branchType, parentTransaction.getId(), parentTransaction.getBranchId(), branchGuid, branchName, getAssociatedArtifactId(associatedArtifact), getAuthorId(), creationComment, - populateBaseTxFromAddressingQueryId, destinationBranchId); + mergeAddressingQueryId, destinationBranchId); BranchCreationResponse response = HttpClientMessage.send(OseeServerContext.BRANCH_CONTEXT, parameters, CoreTranslatorId.BRANCH_CREATION_REQUEST, diff --git a/plugins/org.eclipse.osee.orcs.core.integration.test/src/org/eclipse/osee/orcs/core/internal/OrcsBranchTest.java b/plugins/org.eclipse.osee.orcs.core.integration.test/src/org/eclipse/osee/orcs/core/internal/OrcsBranchTest.java index a3cba97..770b054 100644 --- a/plugins/org.eclipse.osee.orcs.core.integration.test/src/org/eclipse/osee/orcs/core/internal/OrcsBranchTest.java +++ b/plugins/org.eclipse.osee.orcs.core.integration.test/src/org/eclipse/osee/orcs/core/internal/OrcsBranchTest.java @@ -52,10 +52,10 @@ public class OrcsBranchTest { @Test public void testCreateBranch() throws Exception { - Integer SOURCE_TX_ID = 13; // Chosen starting transaction on Common Branch - Integer CHANGED_TX_ID = 14; // Transaction containing tested change - Integer MERGE_DESTINATION_ID = -1; // only used on merge branches - Integer MERGE_POPULATE_BASE_TX_ID = -1; // only used on merge branches + int SOURCE_TX_ID = 13; // Chosen starting transaction on Common Branch + int CHANGED_TX_ID = 14; // Transaction containing tested change + int MERGE_DESTINATION_BRANCH_ID = -1; // only used on merge branches + int MERGE_ADDRESSING_QUERY_ID = -1; // only used on merge branches // set up the query factory for the test QueryFactory qf = orcsApi.getQueryFactory(context); @@ -72,9 +72,9 @@ public class OrcsBranchTest { createData.setUserArtifact(createdBy); createData.setAssociatedArtifact(createdBy); - createData.setDestinationBranchId(MERGE_DESTINATION_ID); + createData.setMergeDestinationBranchId(MERGE_DESTINATION_BRANCH_ID); - createData.setPopulateBaseTxFromAddressingQueryId(MERGE_POPULATE_BASE_TX_ID); + createData.setMergeAddressingQueryId(MERGE_ADDRESSING_QUERY_ID); Callable<ReadableBranch> callable = branchInterface.createBranch(createData); Assert.assertNotNull(callable); ReadableBranch priorBranch = callable.call(); @@ -107,9 +107,9 @@ public class OrcsBranchTest { createData.setUserArtifact(createdByNew); createData.setAssociatedArtifact(createdByNew); - createData.setDestinationBranchId(MERGE_DESTINATION_ID); + createData.setMergeDestinationBranchId(MERGE_DESTINATION_BRANCH_ID); - createData.setPopulateBaseTxFromAddressingQueryId(MERGE_POPULATE_BASE_TX_ID); + createData.setMergeAddressingQueryId(MERGE_ADDRESSING_QUERY_ID); Callable<ReadableBranch> postCallable = branchInterface.createBranch(createDataNew); Assert.assertNotNull(postCallable); ReadableBranch postBranch = postCallable.call(); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/CreateDatabaseBranch.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/CreateDatabaseBranch.java index 7894968..bcee779 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/CreateDatabaseBranch.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/branch/CreateDatabaseBranch.java @@ -27,10 +27,10 @@ public class CreateDatabaseBranch { private final int authorId; private final String creationComment; - private final int populateBaseTxFromAddressingQueryId; - private final int destinationBranchId; + private final int mergeAddressingQueryId; + private final int mergeDestinationBranchId; - public CreateDatabaseBranch(BranchType branchType, int sourceTransactionId, int parentBranchId, String branchGuid, String branchName, int associatedArtifactId, int authorId, String creationComment, int populateBaseTxFromAddressingQueryId, int destinationBranchId) { + public CreateDatabaseBranch(BranchType branchType, int sourceTransactionId, int parentBranchId, String branchGuid, String branchName, int associatedArtifactId, int authorId, String creationComment, int mergeAddressingQueryId, int mergeDestinationBranchId) { this.parentBranchId = parentBranchId; this.branchName = branchName; this.associatedArtifactId = associatedArtifactId; @@ -39,8 +39,8 @@ public class CreateDatabaseBranch { this.branchGuid = branchGuid; this.authorId = authorId; this.creationComment = creationComment; - this.populateBaseTxFromAddressingQueryId = populateBaseTxFromAddressingQueryId; - this.destinationBranchId = destinationBranchId; + this.mergeAddressingQueryId = mergeAddressingQueryId; + this.mergeDestinationBranchId = mergeDestinationBranchId; } public String getBranchName() { @@ -75,12 +75,12 @@ public class CreateDatabaseBranch { return creationComment; } - public int getPopulateBaseTxFromAddressingQueryId() { - return populateBaseTxFromAddressingQueryId; + public int getMergeAddressingQueryId() { + return mergeAddressingQueryId; } - public int getDestinationBranchId() { - return destinationBranchId; + public int getMergeDestinationBranchId() { + return mergeDestinationBranchId; } @Override diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseCallable.java index 9c95cb9..34a0174 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseCallable.java @@ -88,12 +88,12 @@ public class CreateBranchDatabaseCallable extends DatabaseCallable<Branch> { parentBranchId = sourceTx.getBranchId(); } - int populateBaseTxFromAddressingQueryId = branchData.getPopulateBaseTxFromAddressingQueryId(); - int destinationBranchId = branchData.getDestinationBranchId(); + int mergeAddressingQueryId = branchData.getMergeAddressingQueryId(); + int destinationBranchId = branchData.getMergeDestinationBranchId(); CreateDatabaseBranch createBranchData = new CreateDatabaseBranch(branchType, sourceTransactionId, parentBranchId, branchGuid, branchName, - associatedArtifactId, authorId, creationComment, populateBaseTxFromAddressingQueryId, destinationBranchId); + associatedArtifactId, authorId, creationComment, mergeAddressingQueryId, destinationBranchId); Callable<Branch> callable = new CreateBranchDatabaseTxCallable(getLogger(), getDatabaseService(), getBranchCache(), getTxCache(), 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 c382cf3..e3ba0fe 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 @@ -127,7 +127,7 @@ public class CreateBranchDatabaseTxCallable extends DatabaseTxCallable<Branch> { @Override protected Branch handleTxWork(OseeConnection connection) throws OseeCoreException { Branch parentBranch = branchCache.getById(newBranchData.getParentBranchId()); - Branch destinationBranch = branchCache.getById(newBranchData.getDestinationBranchId()); + Branch destinationBranch = branchCache.getById(newBranchData.getMergeDestinationBranchId()); passedPreConditions = false; checkPreconditions(parentBranch, destinationBranch); @@ -178,9 +178,9 @@ public class CreateBranchDatabaseTxCallable extends DatabaseTxCallable<Branch> { } branch.setBaseTransaction(record); txCache.cache(record); - populateBaseTransaction(0.30, connection, branch, newBranchData.getPopulateBaseTxFromAddressingQueryId()); + populateBaseTransaction(0.30, connection, branch, newBranchData.getMergeAddressingQueryId()); - addMergeBranchEntry(0.20, connection, branch, newBranchData.getDestinationBranchId()); + addMergeBranchEntry(0.20, connection, branch, newBranchData.getMergeDestinationBranchId()); wasSuccessful = true; return branch; } @@ -209,12 +209,12 @@ public class CreateBranchDatabaseTxCallable extends DatabaseTxCallable<Branch> { if (branch.getBranchType().isMergeBranch()) { int parentBranchId = branch.hasParentBranch() ? branch.getParentBranch().getId() : -1; getDatabaseService().runPreparedUpdate(connection, MERGE_BRANCH_INSERT, parentBranchId, - newBranchData.getDestinationBranchId(), branch.getId(), 0); + newBranchData.getMergeDestinationBranchId(), branch.getId(), 0); } checkForCancelled(); } - private void populateBaseTransaction(double workAmount, OseeConnection connection, Branch branch, int populateBaseTxFromAddressingQueryId) throws OseeCoreException { + private void populateBaseTransaction(double workAmount, OseeConnection connection, Branch branch, int mergeAddressingQueryId) throws OseeCoreException { if (branch.getBranchType() != BranchType.SYSTEM_ROOT) { List<Object[]> data = new ArrayList<Object[]>(); HashSet<Integer> gammas = new HashSet<Integer>(100000); @@ -225,9 +225,9 @@ public class CreateBranchDatabaseTxCallable extends DatabaseTxCallable<Branch> { int baseTxId = branch.getBaseTransaction().getId(); if (branch.getBranchType().isMergeBranch()) { populateAddressingToCopy(connection, data, baseTxId, gammas, SELECT_ATTRIBUTE_ADDRESSING_FROM_JOIN, - parentBranchId, TxChange.NOT_CURRENT.getValue(), populateBaseTxFromAddressingQueryId); + parentBranchId, TxChange.NOT_CURRENT.getValue(), mergeAddressingQueryId); populateAddressingToCopy(connection, data, baseTxId, gammas, SELECT_ARTIFACT_ADDRESSING_FROM_JOIN, - parentBranchId, TxChange.NOT_CURRENT.getValue(), populateBaseTxFromAddressingQueryId); + parentBranchId, TxChange.NOT_CURRENT.getValue(), mergeAddressingQueryId); } else { populateAddressingToCopy(connection, data, baseTxId, gammas, SELECT_ADDRESSING, TxChange.NOT_CURRENT.getValue(), parentBranchId, branch.getSourceTransaction().getId()); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InitializeDatastoreCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InitializeDatastoreCallable.java index 55bdee3..62625e6 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InitializeDatastoreCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InitializeDatastoreCallable.java @@ -109,8 +109,8 @@ public class InitializeDatastoreCallable extends DatabaseCallable<DataStoreInfo> data.setFromTransaction(null); - data.setPopulateBaseTxFromAddressingQueryId(-1); - data.setDestinationBranchId(-1); + data.setMergeAddressingQueryId(-1); + data.setMergeDestinationBranchId(-1); return data; } diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/CreateBranchData.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/CreateBranchData.java index 3f9a83b..abac323 100644 --- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/CreateBranchData.java +++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/data/CreateBranchData.java @@ -29,8 +29,8 @@ public class CreateBranchData implements Identifiable { private ReadableArtifact userArtifact; // Merge Branch Legacy Support - private int populateBaseTxFromAddressingQueryId; - private int destinationBranchId; + private int mergeAddressingQueryId; + private int mergeDestinationBranchId; @Override public String getGuid() { @@ -90,22 +90,23 @@ public class CreateBranchData implements Identifiable { this.associatedArtifact = associatedArtifact; } - public int getPopulateBaseTxFromAddressingQueryId() { - return populateBaseTxFromAddressingQueryId; + public int getMergeAddressingQueryId() { + return mergeAddressingQueryId; } - public void setPopulateBaseTxFromAddressingQueryId(int populateBaseTxFromAddressingQueryId) { - this.populateBaseTxFromAddressingQueryId = populateBaseTxFromAddressingQueryId; + public void setMergeAddressingQueryId(int mergeAddressingQueryId) { + this.mergeAddressingQueryId = mergeAddressingQueryId; } - public int getDestinationBranchId() { - return destinationBranchId; + public int getMergeDestinationBranchId() { + return mergeDestinationBranchId; } - public void setDestinationBranchId(int destinationBranchId) { - this.destinationBranchId = destinationBranchId; + public void setMergeDestinationBranchId(int destinationBranchId) { + this.mergeDestinationBranchId = destinationBranchId; } + @Override public int hashCode() { return getGuid().hashCode(); @@ -131,7 +132,7 @@ public class CreateBranchData implements Identifiable { @Override public String toString() { - return "CreateBranchData [branchUuid=" + branchUuid + ", branchName=" + branchName + ", branchType=" + branchType + ", creationComment=" + creationComment + ", fromTransaction=" + fromTransaction + ", associatedArtifact=" + associatedArtifact + ", userArtifact=" + userArtifact + ", populateBaseTxFromAddressingQueryId=" + populateBaseTxFromAddressingQueryId + ", destinationBranchId=" + destinationBranchId + "]"; + return "CreateBranchData [branchUuid=" + branchUuid + ", branchName=" + branchName + ", branchType=" + branchType + ", creationComment=" + creationComment + ", fromTransaction=" + fromTransaction + ", associatedArtifact=" + associatedArtifact + ", userArtifact=" + userArtifact + ", mergeAddressingQueryId=" + mergeAddressingQueryId + ", destinationBranchId=" + mergeDestinationBranchId + "]"; } } |

