QueryIterable<T> Class

  • java.lang.Object
    • Iterable<T>
      • com.microsoft.azure.documentdb.QueryIterable<T>

Type Parameters

T

the resource type of the query iterable.

public class QueryIterable

This is the template class for iterable resources in the Azure Cosmos DB database service.

Constructor Summary

Constructor Description
QueryIterable(DocumentClient client, ResourceType resourceType, Class<T> classT, String resourceLink, FeedOptionsBase options)
QueryIterable(DocumentClient client, ResourceType resourceType, Class<T> classT, String resourceLink, FeedOptionsBase options, Object partitionKey)
QueryIterable(DocumentClient client, ResourceType resourceType, Class<T> classT, String resourceLink, SqlQuerySpec querySpec, FeedOptionsBase options)
QueryIterable(DocumentClient client, ResourceType resourceType, Class<T> classT, String resourceLink, SqlQuerySpec querySpec, FeedOptionsBase options, Object partitionKey)

Method Summary

Modifier and Type Method and Description
List<T> fetchNextBlock()

Fetch the next block of query results.

Map<String, String> getResponseHeaders()

Gets the response headers.

Iterator<T> iterator()

Gets the iterator of the iterable.

void reset()

Resets the iterable.

List<T> toList()

Get the list of the iterable resources.

Constructor Details

QueryIterable

protected QueryIterable(DocumentClient client, ResourceType resourceType, Class classT, String resourceLink, FeedOptionsBase options)

Parameters:

client
resourceType
classT
resourceLink
options

QueryIterable

protected QueryIterable(DocumentClient client, ResourceType resourceType, Class classT, String resourceLink, FeedOptionsBase options, Object partitionKey)

Parameters:

client
resourceType
classT
resourceLink
options
partitionKey

QueryIterable

protected QueryIterable(DocumentClient client, ResourceType resourceType, Class classT, String resourceLink, SqlQuerySpec querySpec, FeedOptionsBase options)

Parameters:

client
resourceType
classT
resourceLink
querySpec
options

QueryIterable

protected QueryIterable(DocumentClient client, ResourceType resourceType, Class classT, String resourceLink, SqlQuerySpec querySpec, FeedOptionsBase options, Object partitionKey)

Parameters:

client
resourceType
classT
resourceLink
querySpec
options
partitionKey

Method Details

fetchNextBlock

public List fetchNextBlock()

Fetch the next block of query results.

Returns:

the list of fetched resources.

Throws:

DocumentClientException - the document client exception.

getResponseHeaders

public Map getResponseHeaders()

Gets the response headers.

Returns:

the response headers.

iterator

public Iterator iterator()

Gets the iterator of the iterable.

Returns:

the iterator.

reset

public void reset()

Resets the iterable.

toList

public List toList()

Get the list of the iterable resources.

Returns:

the list of the iterable resources.

Applies to