Package org.apache.sling.resourceresolver.impl.mapping

# Class PagedQueryIterator

java.lang.Object
org.apache.sling.resourceresolver.impl.mapping.PagedQueryIterator

All Implemented Interfaces:
  `Iterator<org.apache.sling.api.resource.Resource>`

public class PagedQueryIterator extends Object implements Iterator<org.apache.sling.api.resource.Resource>
Utility class for running paged queries.

## Constructor Summary

Constructors
Constructor
Description
`PagedQueryIterator(String subject, String propertyName, org.apache.sling.api.resource.ResourceResolver resolver, String query, int pageSize)`

## Method Summary

Modifier and Type
Method
Description
`@NotNull String`
`getStatistics()`
`@NotNull String`
`getWarning()`
`boolean`
`hasNext()`
`org.apache.sling.api.resource.Resource`
`next()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Iterator

`forEachRemaining, remove`

## Constructor Details

### PagedQueryIterator

public PagedQueryIterator(String subject, String propertyName, org.apache.sling.api.resource.ResourceResolver resolver, String query, int pageSize)

Parameters:
  `subject` - name of the query, will be used only for logging
  `propertyName` - name of multivalued string property to query on (used for diagnostics)
  `resolver` - resource resolver
  `query` - query string in SQL2 syntax
  `pageSize` - page size (start a new query after page size is exceeded)

## Method Details

### hasNext

public boolean hasNext()

Specified by:
  `hasNext` in interface `Iterator<org.apache.sling.api.resource.Resource>`

### next

public org.apache.sling.api.resource.Resource next() throws NoSuchElementException

Specified by:
  `next` in interface `Iterator<org.apache.sling.api.resource.Resource>`
Throws:
  `NoSuchElementException`

### getStatistics

@NotNull public @NotNull String getStatistics()

### getWarning

@NotNull public @NotNull String getWarning()