java.lang.Object
com.hedera.hashgraph.sdk.Executable<TokenNftInfoQuery,Query,Response,List<TokenNftInfo>>
com.hedera.hashgraph.sdk.Query<List<TokenNftInfo>,TokenNftInfoQuery>
com.hedera.hashgraph.sdk.TokenNftInfoQuery
A query that returns information about a non-fungible token (NFT).
You request the info for an NFT by specifying the NFT ID.
See Hedera Documentation
-
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 TypeMethodDescriptionbyAccountId(AccountId accountId) Deprecated.with no replacementDeprecated.usesetNftId(NftId)insteadDeprecated.with no replacementDeprecated.getCostAsync(Client client) Fetch the expected cost asynchronously.longgetEnd()Deprecated.Called to direct the invocation of the query to the appropriate gRPC service.getNftId()Extract the nft id.longgetStart()Deprecated.Deprecated.(package private) QueryHeadermapRequestHeader(Query request) The derived class should access its request header and return.(package private) List<TokenNftInfo> mapResponse(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) CompletableFuture<Void> onExecuteAsync(Client client) Note: This method requires API level 33 or higher.(package private) voidonMakeRequest(Query.Builder queryBuilder, QueryHeader header) Called inQuery.makeRequest()just before the query is built.setEnd(long end) Deprecated.with no replacementSets the NFT ID for which information is requested.setStart(long start) Deprecated.with no replacement(package private) voidvalidateChecksums(Client client) Validate the checksums.Methods inherited from class com.hedera.hashgraph.sdk.Query
getCost, getCost, getCostAsync, getCostAsync, getCostAsync, getCostAsync, getCostAsync, getOperatorFromClient, getPaymentTransaction, getPaymentTransactionId, getTransactionIdInternal, isPaymentRequired, makeRequest, mapResponseStatus, onExecute, setMaxQueryPayment, setPaymentTransactionId, setQueryPayment, toStringMethods inherited from class com.hedera.hashgraph.sdk.Executable
advanceRequest, checkNodeAccountIds, execute, execute, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, getExecutionState, getGrpcRequest, getMaxAttempts, getMaxBackoff, getMaxRetry, getMinBackoff, getNodeAccountIds, getNodeForExecute, grpcDeadline, isBatchedAndNotBatchTransaction, logTransaction, mergeFromClient, setGrpcDeadline, setLogger, setMaxAttempts, setMaxBackoff, setMaxRetry, setMinBackoff, setNodeAccountIds, setNodesFromNodeAccountIds, setRequestListener, setResponseListener, shouldRetryExceptionally
-
Constructor Details
-
TokenNftInfoQuery
public TokenNftInfoQuery()Constructor.
-
-
Method Details
-
byNftId
Deprecated.usesetNftId(NftId)insteadSets the NFT ID for which information is requested.- Parameters:
nftId- The NftId to be set- Returns:
this
-
setNftId
Sets the NFT ID for which information is requested.- Parameters:
nftId- The NftId to be set- Returns:
this
-
getNftId
Extract the nft id.- Returns:
- the nft id
-
byTokenId
Deprecated.with no replacementSets the Token ID and the index range for which information is requested.- Parameters:
tokenId- The ID of the token for which information is requested- Returns:
this
-
getTokenId
Deprecated.Extract the token id- Returns:
- the tokenId
-
byAccountId
Deprecated.with no replacementSets the Account ID for which information is requested.- Parameters:
accountId- The Account ID for which information is requested- Returns:
this
-
getAccountId
Deprecated.Get the Account ID for which information is requested- Returns:
- the accountId
-
getStart
Deprecated.Get the start of the index range for which information is requested- Returns:
- the start
-
setStart
Deprecated.with no replacementSets the start of the index range for which information is requested.- Parameters:
start- The start index (inclusive) of the range of NFTs to query for. Value must be in the range [0; ownedNFTs-1]- Returns:
this
-
getEnd
Deprecated.Get the end of the index range for which information is requested- Returns:
- the end
-
setEnd
Deprecated.with no replacementSets the end of the index range for which information is requested.- Parameters:
end- The end index (exclusive) of the range of NFTs to query for. Value must be in the range (start; ownedNFTs]- Returns:
this
-
validateChecksums
Description copied from class:QueryValidate the checksums.- Specified by:
validateChecksumsin classQuery<List<TokenNftInfo>,TokenNftInfoQuery> - Throws:
BadEntityIdException
-
onExecuteAsync
Description copied from class:QueryNote: This method requires API level 33 or higher. It will not work on devices running API versions below 31 because it uses features introduced in API level 31 (Android 12).
*- Overrides:
onExecuteAsyncin classQuery<List<TokenNftInfo>,TokenNftInfoQuery>
-
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<List<TokenNftInfo>,TokenNftInfoQuery>
-
mapResponseHeader
Description copied from class:QueryThe derived class should access its response header and return.- Specified by:
mapResponseHeaderin classQuery<List<TokenNftInfo>,TokenNftInfoQuery>
-
mapRequestHeader
Description copied from class:QueryThe derived class should access its request header and return.- Specified by:
mapRequestHeaderin classQuery<List<TokenNftInfo>,TokenNftInfoQuery>
-
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<TokenNftInfoQuery,Query, Response, List<TokenNftInfo>>
-
getMethodDescriptor
Description copied from class:ExecutableCalled to direct the invocation of the query to the appropriate gRPC service.- Specified by:
getMethodDescriptorin classExecutable<TokenNftInfoQuery,Query, Response, List<TokenNftInfo>>
-
getCostAsync
Description copied from class:QueryFetch the expected cost asynchronously.- Overrides:
getCostAsyncin classQuery<List<TokenNftInfo>,TokenNftInfoQuery> - Parameters:
client- the client- Returns:
- Future result of the cost in hbar
-