Package org.wildfly.transaction.client
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 Summary
Constructors Constructor Description ImportResult(T transaction, SubordinateTransactionControl control, boolean isNew)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubordinateTransactionControlgetControl()Get the subordinate controller.TgetTransaction()Get the transaction.booleanisNew()Determine whether this import resulted in a new transaction.<S extends jakarta.transaction.Transaction>
ImportResult<S>withTransaction(S transaction)Get a copy of this import result, with a new transaction object.
-
-
-
Constructor Detail
-
ImportResult
public ImportResult(T transaction, SubordinateTransactionControl control, boolean isNew)
Construct a new instance.- Parameters:
transaction- the new transaction (must not benull)control- the controller for the subordinate transaction (must not benull)isNew-trueif the transaction was just now imported,falseif the transaction already existed
-
-
Method Detail
-
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:
trueif the transaction was new,falseotherwise
-
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 benull)- Returns:
- the new import result (not
null)
-
-