Package dev.mintychochip.mint
Class TransactionResult.Impl
java.lang.Object
dev.mintychochip.mint.TransactionResult.Impl
- All Implemented Interfaces:
TransactionResult
- Enclosing interface:
TransactionResult
Default implementation of TransactionResult.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.mintychochip.mint.TransactionResult
TransactionResult.Impl -
Method Summary
Modifier and TypeMethodDescriptionGets the instant when the transaction was committed.getId()Gets the unique identifier for this transaction.intGets the number of operations executed in this transaction.Gets all operations executed in this transaction in execution order.getOperationsFor(UUID accountId) Gets all operations that affected the specified account.Gets the instant when the transaction was created.getState()Gets the final state of the transaction.Gets the sum of all operation amounts.
-
Method Details
-
getId
Description copied from interface:TransactionResultGets the unique identifier for this transaction.- Specified by:
getIdin interfaceTransactionResult- Returns:
- the transaction UUID
-
getOperations
Description copied from interface:TransactionResultGets 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:TransactionResultGets the number of operations executed in this transaction.- Specified by:
getOperationCountin interfaceTransactionResult- Returns:
- operation count
-
getTotalAmount
Description copied from interface:TransactionResultGets 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:TransactionResultGets 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:TransactionResultGets 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:TransactionResultGets the instant when the transaction was created.- Specified by:
getStartTimein interfaceTransactionResult- Returns:
- transaction start timestamp
-
getCommitTime
Description copied from interface:TransactionResultGets the instant when the transaction was committed.- Specified by:
getCommitTimein interfaceTransactionResult- Returns:
- transaction commit timestamp
-