public class QueryCollection extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
QueryCollection(int pageSize,
QueryType requestQueryType,
IotHubConnectionString iotHubConnectionString,
URL url,
HttpMethod httpMethod,
long timeout)
Constructor for non-sql based queries
|
protected |
QueryCollection(String query,
int pageSize,
QueryType requestQueryType,
IotHubConnectionString iotHubConnectionString,
URL url,
HttpMethod httpMethod,
long timeout)
Constructor for sql based queries
|
| Modifier and Type | Method and Description |
|---|---|
protected Integer |
getPageSize()
Getter for page size.
|
protected boolean |
hasNext()
Returns if this query collection has a next collection to return.
|
protected QueryCollectionResponse<String> |
next()
Returns the next QueryCollectionResponse object.
|
protected QueryCollectionResponse<String> |
next(QueryOptions options)
Returns the next QueryCollectionResponse object.
|
protected QueryCollection(String query, int pageSize, QueryType requestQueryType, IotHubConnectionString iotHubConnectionString, URL url, HttpMethod httpMethod, long timeout)
query - the sql query to usepageSize - the size of the page to return per query collection responserequestQueryType - the type of query this isiotHubConnectionString - the connection string to connect with to query againsturl - the url to query againsthttpMethod - the http method to call with the querytimeout - timeout until the request expiresIllegalArgumentException - if page size is 0 or negative, or if the query type is null or unknown, of if the query string is null or empty,
or if the provided connection string is null, or if the provided url is null, or if the provided http method is nullprotected QueryCollection(int pageSize,
QueryType requestQueryType,
IotHubConnectionString iotHubConnectionString,
URL url,
HttpMethod httpMethod,
long timeout)
pageSize - the size of the page to return per query collection responserequestQueryType - the type of query this isiotHubConnectionString - the connection string to connect with to query againsturl - the url to query againsthttpMethod - the http method to call with the querytimeout - timeout until the request expiresIllegalArgumentException - if page size is 0 or negative, or if the query type is null or unknown,
or if the provided connection string is null, or if the provided url is null, or if the provided http method is nullprotected boolean hasNext()
protected QueryCollectionResponse<String> next() throws IOException, IotHubException
IOException - If an IOException occurs when calling the Service API, or if the results of that call are unexpectedIotHubException - If an IotHubException occurs when calling the Service APIprotected QueryCollectionResponse<String> next(QueryOptions options) throws IOException, IotHubException
options - The options for the queryIOException - If an IOException occurs when calling the Service API, or if the results of that call are unexpectedIotHubException - If an IotHubException occurs when calling the Service APIprotected Integer getPageSize()
Copyright © 2017. All rights reserved.