Class ComparisonDataSourceTransactionalContext

java.lang.Object
com._1c.g5.v8.dt.compare.datasource.ComparisonDataSourceTransactionalContext

public class ComparisonDataSourceTransactionalContext extends Object
Data source transactional context holder. Contains all transactions started for the current operation for all available data sources participating in the operation.
  • 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 transaction
      otherTransaction - The other source transaction
      ancestorTransaction - The ancestor side transaction
      mergeMode - 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

      public IComparisonDataSourceTransaction getTransaction(ComparisonSide side)
      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