Class ImportResult<T extends jakarta.transaction.Transaction>

java.lang.Object
org.wildfly.transaction.client.ImportResult<T>

public final class ImportResult<T extends jakarta.transaction.Transaction> extends Object
Class representing the result of a transaction import.
Author:
David M. Lloyd
  • Constructor Details

    • ImportResult

      public ImportResult(T transaction, SubordinateTransactionControl control, boolean isNew)
      Construct a new instance.
      Parameters:
      transaction - the new transaction (must not be null)
      control - the controller for the subordinate transaction (must not be null)
      isNew - true if the transaction was just now imported, false if the transaction already existed
  • Method Details

    • getTransaction

      public T getTransaction()
      Get the transaction.
      Returns:
      the transaction (not null)
    • getControl

      public SubordinateTransactionControl getControl()
      Get the subordinate controller.
      Returns:
      the subordinate controller (not null)
    • isNew

      public boolean isNew()
      Determine whether this import resulted in a new transaction.
      Returns:
      true if the transaction was new, false otherwise
    • withTransaction

      public <S extends jakarta.transaction.Transaction> ImportResult<S> withTransaction(S transaction)
      Get a copy of this import result, with a new transaction object.
      Type Parameters:
      S - the new transaction type
      Parameters:
      transaction - the transaction object (must not be null)
      Returns:
      the new import result (not null)