RawQueryResponse Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.service.query.RawQueryResponse

public class RawQueryResponse

A pageable set of undefined json objects returned from a query.

Constructor Summary

Constructor Description
RawQueryResponse(String json, QueryClient queryClient, String originalQuery)

Method Summary

Modifier and Type Method and Description
boolean hasNext()
String next()

Return the next json object from the query. If the previous page of query results has been exhausted, then this method will make a request to the service to get the next page of results using the default paging options.

String next(QueryPageOptions pageOptions)

Return the next json object from the query. If the previous page of query results has been exhausted, then this method will make a request to the service to get the next page of results using the provided paging options.

Constructor Details

RawQueryResponse

public RawQueryResponse(String json, QueryClient queryClient, String originalQuery)

Parameters:

json
queryClient
originalQuery

Method Details

hasNext

public boolean hasNext()

Returns:

True if the query has at least one more json object to return. False otherwise.

next

public String next()

Return the next json object from the query. If the previous page of query results has been exhausted, then this method will make a request to the service to get the next page of results using the default paging options.

Returns:

the next json object from the query.

Throws:

IotHubException - If any IoT Hub level errors occur such as an IotHubUnauthorizedException.
IOException - If any network level errors occur.
NoSuchElementException - If there is no next object to return anymore.

next

public String next(QueryPageOptions pageOptions)

Return the next json object from the query. If the previous page of query results has been exhausted, then this method will make a request to the service to get the next page of results using the provided paging options.

Parameters:

pageOptions - the options for the next page of results if the next page is retrieved to fulfil this request for the next json object. May not be null.

Returns:

the next json object from the query.

Throws:

IotHubException - If any IoT Hub level errors occur such as an IotHubUnauthorizedException.
IOException - If any network level errors occur.
NoSuchElementException - If there is no next object to return anymore.

Applies to