Class BackupCopyTransaction


public class BackupCopyTransaction extends RemoveEverythingTransaction
Transaction that performs a clear + copy operation to duplicate a source database in the current one.
  • Constructor Details

    • BackupCopyTransaction

      public BackupCopyTransaction(Database sourceDB, Database destinationDB)
  • Method Details

    • shouldBeExecuted

      protected boolean shouldBeExecuted()
      Description copied from class: Transaction
      Override this method for conditional execution.

      Please note that the transaction has not been initialized and class variables are not available for queries. The condition should depend on other variables (Like the data that is to be stored) given to the transaction.

      Overrides:
      shouldBeExecuted in class ThrowawayTransaction
      Returns:
      false if the transaction should not execute.
    • performOperations

      protected void performOperations()
      Description copied from class: Transaction
      Implement this method for transaction execution.
      Overrides:
      performOperations in class RemoveEverythingTransaction