Package org.wildfly.transaction.client
Class ImportResult<T extends jakarta.transaction.Transaction>
java.lang.Object
org.wildfly.transaction.client.ImportResult<T>
Class representing the result of a transaction import.
- Author:
- David M. Lloyd
-
Constructor Summary
ConstructorsConstructorDescriptionImportResult(T transaction, SubordinateTransactionControl control, boolean isNew) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionGet the subordinate controller.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 Details
-
ImportResult
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 Details
-
getTransaction
Get the transaction.- Returns:
- the transaction (not
null)
-
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
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)
-