Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2016-07-03 23:56:24 +0000
committerRyan D. Brooks2016-07-06 23:00:34 +0000
commit6d662ae536b56fec0fefe277d6a6db8778515e72 (patch)
treefbce217a97914a4475c6b35a7d7e027832ef45a1 /plugins/org.eclipse.osee.orcs.db
parentd75edab73d8694bf4130e079df4f1fdcaf5fdf8c (diff)
downloadorg.eclipse.osee-6d662ae536b56fec0fefe277d6a6db8778515e72.tar.gz
org.eclipse.osee-6d662ae536b56fec0fefe277d6a6db8778515e72.tar.xz
org.eclipse.osee-6d662ae536b56fec0fefe277d6a6db8778515e72.zip
refactor: Use ArtifactId in createTransaction
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/transaction/CommitTransactionDatabaseTxCallable.java9
1 files changed, 4 insertions, 5 deletions
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 7faa811e9a8..e5f9416c4e2 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
@@ -11,6 +11,7 @@
package org.eclipse.osee.orcs.db.internal.transaction;
import java.util.Date;
+import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.enums.BranchState;
import org.eclipse.osee.framework.core.enums.TransactionDetailsType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -23,7 +24,6 @@ import org.eclipse.osee.orcs.OrcsSession;
import org.eclipse.osee.orcs.core.ds.OrcsChangeSet;
import org.eclipse.osee.orcs.core.ds.TransactionData;
import org.eclipse.osee.orcs.core.ds.TransactionResult;
-import org.eclipse.osee.orcs.data.ArtifactReadable;
import org.eclipse.osee.orcs.data.TransactionReadable;
import org.eclipse.osee.orcs.db.internal.IdentityManager;
import org.eclipse.osee.orcs.db.internal.callable.AbstractDatastoreTxCallable;
@@ -75,7 +75,7 @@ public final class CommitTransactionDatabaseTxCallable extends AbstractDatastore
// 1. Make this whole method a critical region on a per branch basis - can only write to a branch on one thread at time
String comment = transactionData.getComment();
Long branchId = transactionData.getBranchId();
- ArtifactReadable author = transactionData.getAuthor();
+ ArtifactId author = transactionData.getAuthor();
OrcsChangeSet changeSet = transactionData.getChangeSet();
Conditions.checkNotNull(branchId, "branch");
@@ -109,13 +109,12 @@ public final class CommitTransactionDatabaseTxCallable extends AbstractDatastore
process(TxWritePhaseEnum.AFTER_TX_WRITE);
}
- private TransactionReadable createTransactionRecord(Long branchId, ArtifactReadable author, String comment, int transactionNumber) throws OseeCoreException {
- int authorArtId = author.getLocalId();
+ private TransactionReadable createTransactionRecord(Long branchId, ArtifactId author, String comment, int transactionNumber) throws OseeCoreException {
TransactionDetailsType txType = TransactionDetailsType.NonBaselined;
Date transactionTime = GlobalTime.GreenwichMeanTimestamp();
TransactionDataImpl created = new TransactionDataImpl();
- created.setAuthorId(authorArtId);
+ created.setAuthorId(author.getUuid().intValue());
created.setBranchId(branchId);
created.setComment(comment);
created.setCommit(RelationalConstants.ART_ID_SENTINEL);

Back to the top