Class ComparisonDataSourceTransactionalContext
java.lang.Object
com._1c.g5.v8.dt.compare.datasource.ComparisonDataSourceTransactionalContext
Data source transactional context holder. Contains all transactions started for the current operation for all
available data sources participating in the operation.
-
Constructor Summary
ConstructorsConstructorDescriptionComparisonDataSourceTransactionalContext
(IComparisonSession session, IBmTransaction mergeTransaction) Constructs the context using the data from the comparison session.ComparisonDataSourceTransactionalContext
(IComparisonDataSourceTransaction mainTransaction, IComparisonDataSourceTransaction otherTransaction, IComparisonDataSourceTransaction ancestorTransaction, boolean mergeMode) Creates an instance of the context using the provided set of transactions -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the transactional context, effectively closing all underlying transactionsgetTransaction
(ComparisonSide side) Gets the transaction for the given side.void
reset()
Resets the transactional context, effectively closing all read-only transactions
-
Constructor Details
-
ComparisonDataSourceTransactionalContext
public ComparisonDataSourceTransactionalContext(IComparisonDataSourceTransaction mainTransaction, IComparisonDataSourceTransaction otherTransaction, IComparisonDataSourceTransaction ancestorTransaction, boolean mergeMode) Creates an instance of the context using the provided set of transactions- Parameters:
mainTransaction
- The main source transactionotherTransaction
- The other source transactionancestorTransaction
- The ancestor side transactionmergeMode
- During the merge the main data source transaction is in a slave mode, so we shouldn't dispose it.
-
ComparisonDataSourceTransactionalContext
public ComparisonDataSourceTransactionalContext(IComparisonSession session, IBmTransaction mergeTransaction) Constructs the context using the data from the comparison session.- Parameters:
session
- The current comparison session. Cannot be {@code null) @param mergeTransaction The merge transaction. Can be {@code null) in case of comparison mode
-
-
Method Details
-
close
public void close()Closes the transactional context, effectively closing all underlying transactions -
reset
public void reset()Resets the transactional context, effectively closing all read-only transactions -
getTransaction
Gets the transaction for the given side.- Parameters:
side
- The comparison side. Cannot be {@code null) @return The corresponding transaction if available; {@code null} otherwise
-