QueryIterable<T> Class

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

Type Parameters

T

the resource type of the query iterable.

Implements

java.lang.Iterable<T>

public class QueryIterable
implements java.lang.Iterable<T>

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

Constructor Summary

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

Method Summary

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

Fetch the next block of query results.

java.util.Map<java.lang.String,java.lang.String> getResponseHeaders()

Gets the response headers.

java.util.Iterator<T> iterator()

Gets the iterator of the iterable.

void reset()

Resets the iterable.

java.util.List<T> toList()

Get the list of the iterable resources.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

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