java.lang.Object
com.hedera.hashgraph.sdk.Executable<TransactionRecordQuery,Query,Response,TransactionRecord>
com.hedera.hashgraph.sdk.Query<TransactionRecord,TransactionRecordQuery>
com.hedera.hashgraph.sdk.TransactionRecordQuery
Get the record for a transaction.
If the transaction requested a record, then the record lasts for one hour, and a state proof is available for it. If the transaction created an account, file, or smart contract instance, then the record will contain the ID for what it created. If the transaction called a smart contract function, then the record contains the result of that call. If the transaction was a cryptocurrency transfer, then the record includes the TransferList which gives the details of that transfer. If the transaction didn't return anything that should be in the record, then the results field will be set to nothing.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hedera.hashgraph.sdk.Executable
Executable.GrpcRequest -
Field Summary
Fields inherited from class com.hedera.hashgraph.sdk.Query
paymentTransactionId, paymentTransactionsFields inherited from class com.hedera.hashgraph.sdk.Executable
attemptedAllNodes, blockingUnaryCall, grpcDeadline, logger, maxAttempts, maxBackoff, minBackoff, nodeAccountIds, nodes, random, RST_STREAM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) ExecutionStategetExecutionState(Status status, Response response) Default implementation, may be overridden in subclasses (especially for query case).booleanExtract the children be included.booleanShould duplicates be included?Called to direct the invocation of the query to the appropriate gRPC service.Extract the transaction id.(package private) QueryHeadermapRequestHeader(Query request) The derived class should access its request header and return.(package private) TransactionRecordmapResponse(Response response, AccountId nodeId, Query request) Called after receiving the query response from Hedera.(package private) ResponseHeadermapResponseHeader(Response response) The derived class should access its response header and return.(package private) voidonMakeRequest(Query.Builder queryBuilder, QueryHeader header) Called inQuery.makeRequest()just before the query is built.setIncludeChildren(boolean value) Whether the response should include the records of any child transactions spawned by the top-level transaction with the given transactionID.setIncludeDuplicates(boolean value) Whether records of processing duplicate transactions should be returned along with the record of processing the first consensus transaction with the given id whose status was neither INVALID_NODE_ACCOUNT nor INVALID_PAYER_SIGNATURE or, if no such record exists, the record of processing the first transaction to reach consensus with the given transaction id.setTransactionId(TransactionId transactionId) Set the ID of the transaction for which the record is requested.(package private) voidvalidateChecksums(Client client) Validate the checksums.Methods inherited from class com.hedera.hashgraph.sdk.Query
getCost, getCost, getCostAsync, getCostAsync, getCostAsync, getCostAsync, getCostAsync, getCostAsync, getOperatorFromClient, getPaymentTransaction, getPaymentTransactionId, isPaymentRequired, makeRequest, mapResponseStatus, onExecute, onExecuteAsync, setMaxQueryPayment, setPaymentTransactionId, setQueryPayment, toStringMethods inherited from class com.hedera.hashgraph.sdk.Executable
advanceRequest, checkNodeAccountIds, execute, execute, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, getGrpcRequest, getMaxAttempts, getMaxBackoff, getMaxRetry, getMinBackoff, getNodeAccountIds, getNodeForExecute, grpcDeadline, isBatchedAndNotBatchTransaction, logTransaction, mergeFromClient, setGrpcDeadline, setLogger, setMaxAttempts, setMaxBackoff, setMaxRetry, setMinBackoff, setNodeAccountIds, setNodesFromNodeAccountIds, setRequestListener, setResponseListener, shouldRetryExceptionally
-
Constructor Details
-
TransactionRecordQuery
public TransactionRecordQuery()Constructor.
-
-
Method Details
-
getTransactionIdInternal
Extract the transaction id.- Overrides:
getTransactionIdInternalin classQuery<TransactionRecord,TransactionRecordQuery> - Returns:
- the transaction id
-
setTransactionId
Set the ID of the transaction for which the record is requested.- Parameters:
transactionId- The TransactionId to be set- Returns:
this
-
getIncludeDuplicates
public boolean getIncludeDuplicates()Should duplicates be included?- Returns:
- should duplicates be included
-
setIncludeDuplicates
Whether records of processing duplicate transactions should be returned along with the record of processing the first consensus transaction with the given id whose status was neither INVALID_NODE_ACCOUNT nor INVALID_PAYER_SIGNATURE or, if no such record exists, the record of processing the first transaction to reach consensus with the given transaction id.- Parameters:
value- The value that includeDuplicates should be set to; true to include duplicates, false to exclude- Returns:
this
-
getIncludeChildren
public boolean getIncludeChildren()Extract the children be included.- Returns:
- should children be included
-
setIncludeChildren
Whether the response should include the records of any child transactions spawned by the top-level transaction with the given transactionID.- Parameters:
value- The value that includeChildren should be set to; true to include children, false to exclude- Returns:
this
-
validateChecksums
Description copied from class:QueryValidate the checksums.- Specified by:
validateChecksumsin classQuery<TransactionRecord,TransactionRecordQuery> - Throws:
BadEntityIdException
-
onMakeRequest
Description copied from class:QueryCalled inQuery.makeRequest()just before the query is built. The intent is for the derived class to assign their data variant to the query.- Specified by:
onMakeRequestin classQuery<TransactionRecord,TransactionRecordQuery>
-
mapResponseHeader
Description copied from class:QueryThe derived class should access its response header and return.- Specified by:
mapResponseHeaderin classQuery<TransactionRecord,TransactionRecordQuery>
-
mapRequestHeader
Description copied from class:QueryThe derived class should access its request header and return.- Specified by:
mapRequestHeaderin classQuery<TransactionRecord,TransactionRecordQuery>
-
mapResponse
Description copied from class:ExecutableCalled after receiving the query response from Hedera. The derived class should map into its output type.- Specified by:
mapResponsein classExecutable<TransactionRecordQuery,Query, Response, TransactionRecord>
-
getMethodDescriptor
Description copied from class:ExecutableCalled to direct the invocation of the query to the appropriate gRPC service.- Specified by:
getMethodDescriptorin classExecutable<TransactionRecordQuery,Query, Response, TransactionRecord>
-
getExecutionState
Description copied from class:ExecutableDefault implementation, may be overridden in subclasses (especially for query case). Called just after receiving the query response from Hedera. By default it triggers a retry when the pre-check status isBUSY.- Overrides:
getExecutionStatein classExecutable<TransactionRecordQuery,Query, Response, TransactionRecord>
-