Package dev.mintychochip.mint
Class TransactionResult.Impl
java.lang.Object
dev.mintychochip.mint.TransactionResult.Impl
- All Implemented Interfaces:
TransactionResult
- Enclosing interface:
TransactionResult
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.mintychochip.mint.TransactionResult
TransactionResult.Impl -
Method Summary
Modifier and TypeMethodDescriptionReturns the instant when the transaction was committed.getId()Returns the unique identifier for this transaction.intReturns the number of operations executed in this transaction.Returns all operations executed in this transaction in execution order.getOperationsFor(UUID accountId) Returns all operations that affected the specified account.Returns the instant when the transaction was created.getState()Returns the final state of the transaction.Returns the sum of all operation amounts.
-
Method Details
-
getId
Description copied from interface:TransactionResultReturns the unique identifier for this transaction.- Specified by:
getIdin interfaceTransactionResult- Returns:
- the transaction UUID
-
getOperations
Description copied from interface:TransactionResultReturns all operations executed in this transaction in execution order.The returned list is unmodifiable.
- Specified by:
getOperationsin interfaceTransactionResult- Returns:
- immutable list of operations
-
getOperationCount
public int getOperationCount()Description copied from interface:TransactionResultReturns the number of operations executed in this transaction.- Specified by:
getOperationCountin interfaceTransactionResult- Returns:
- operation count
-
getTotalAmount
Description copied from interface:TransactionResultReturns the sum of all operation amounts.This aggregates amounts from all operations regardless of type or direction.
- Specified by:
getTotalAmountin interfaceTransactionResult- Returns:
- total transaction amount
-
getOperationsFor
Description copied from interface:TransactionResultReturns all operations that affected the specified account.Filters operations where
TransactionOperation.accountId()matches the parameter.- Specified by:
getOperationsForin interfaceTransactionResult- Parameters:
accountId- the account identifier to filter by- Returns:
- list of operations for the account (may be empty)
-
getState
Description copied from interface:TransactionResultReturns the final state of the transaction.Always
Transaction.State.COMMITTEDfor results returned from successful commits.- Specified by:
getStatein interfaceTransactionResult- Returns:
- the transaction state
-
getStartTime
Description copied from interface:TransactionResultReturns the instant when the transaction was created.- Specified by:
getStartTimein interfaceTransactionResult- Returns:
- transaction start timestamp
-
getCommitTime
Description copied from interface:TransactionResultReturns the instant when the transaction was committed.- Specified by:
getCommitTimein interfaceTransactionResult- Returns:
- transaction commit timestamp
-