Class MapEntries.PagedQueryIterator
- java.lang.Object
-
- org.apache.sling.resourceresolver.impl.mapping.MapEntries.PagedQueryIterator
-
- All Implemented Interfaces:
Iterator<org.apache.sling.api.resource.Resource>
- Enclosing class:
- MapEntries
protected class MapEntries.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
All Methods Instance Methods Concrete Methods 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 Detail
-
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 loggingpropertyName
- name of multivalued string property to query on (used for diagnostics)resolver
- resource resolverquery
- query string in SQL2 syntaxpageSize
- page size (start a new query after page size is exceeded)
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
next
public org.apache.sling.api.resource.Resource next() throws NoSuchElementException
- Specified by:
next
in interfaceIterator<org.apache.sling.api.resource.Resource>
- Throws:
NoSuchElementException
-
getStatistics
@NotNull public @NotNull String getStatistics()
-
getWarning
@NotNull public @NotNull String getWarning()
-
-