diff options
author | Ryan D. Brooks | 2013-11-07 02:44:06 +0000 |
---|---|---|
committer | Ryan T. Baldwin | 2013-11-07 02:44:06 +0000 |
commit | 8232bb3ce991b477b72d1b2b275bf1edb9366b20 (patch) | |
tree | 9642b9aafff9cf2e34744a5936295d10115587b6 /plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/CommitTransactionDatabaseTxCallable.java | |
parent | 832ecb77900847948827e9464e8ae82fe73a6ae1 (diff) | |
download | org.eclipse.osee-8232bb3ce991b477b72d1b2b275bf1edb9366b20.tar.gz org.eclipse.osee-8232bb3ce991b477b72d1b2b275bf1edb9366b20.tar.xz org.eclipse.osee-8232bb3ce991b477b72d1b2b275bf1edb9366b20.zip |
refactor[ats_ATS8876]: Remove usage of AbstractOseeCache.getLocalId()
Change-Id: I52ab2c939fefc01d5a60fa749a58acba6cc7e689
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/CommitTransactionDatabaseTxCallable.java')
-rw-r--r-- | plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/CommitTransactionDatabaseTxCallable.java | 7 |
1 files changed, 5 insertions, 2 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 6ff1bd3d1d3..15b4aab7bce 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 @@ -30,6 +30,7 @@ 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.db.internal.IdentityLocator; import org.eclipse.osee.orcs.db.internal.callable.AbstractDatastoreTxCallable; import org.eclipse.osee.orcs.db.internal.sql.RelationalConstants; @@ -40,6 +41,7 @@ import org.eclipse.osee.orcs.db.internal.sql.RelationalConstants; */ public final class CommitTransactionDatabaseTxCallable extends AbstractDatastoreTxCallable<TransactionResult> { + private final IdentityLocator identityService; private final BranchCache branchCache; private final TransactionRecordFactory factory; private final TransactionCache transactionCache; @@ -48,9 +50,10 @@ public final class CommitTransactionDatabaseTxCallable extends AbstractDatastore private final TransactionProcessorProvider provider; private final TransactionWriter writer; - public CommitTransactionDatabaseTxCallable(Log logger, OrcsSession session, IOseeDatabaseService dbService, BranchCache branchCache, TransactionCache transactionCache, TransactionRecordFactory factory, TransactionProcessorProvider provider, TransactionWriter writer, TransactionData transactionData) { + public CommitTransactionDatabaseTxCallable(Log logger, OrcsSession session, IOseeDatabaseService dbService, BranchCache branchCache, IdentityLocator identityService, TransactionCache transactionCache, TransactionRecordFactory factory, TransactionProcessorProvider provider, TransactionWriter writer, TransactionData transactionData) { super(logger, session, dbService, String.format("Committing Transaction: [%s] for branch [%s]", transactionData.getComment(), transactionData.getBranch())); + this.identityService = identityService; this.branchCache = branchCache; this.factory = factory; this.transactionCache = transactionCache; @@ -116,7 +119,7 @@ public final class CommitTransactionDatabaseTxCallable extends AbstractDatastore TransactionDetailsType txType = TransactionDetailsType.NonBaselined; Date transactionTime = GlobalTime.GreenwichMeanTimestamp(); - long branchId = branchCache.getLocalId(branch); + long branchId = identityService.getLocalId(branch); return factory.create(transactionNumber, branchId, comment, transactionTime, authorArtId, RelationalConstants.ART_ID_SENTINEL, txType, branchCache); } |