Class SearchResultIterator<T>

  • Type Parameters:
    T - item type
    All Implemented Interfaces:
    java.util.Iterator<T>

    public class SearchResultIterator<T>
    extends java.lang.Object
    implements java.util.Iterator<T>
    The search result iterator allows to iterate seamlessly over huge result sets. The result set content is dynamically loaded by the iterator. Resource loading is implemented through paged queries.
    Author:
    owaeldrich
    • Constructor Summary

      Constructors 
      Constructor Description
      SearchResultIterator​(com.lexmark.saperion.search.SearchExecutionService<T> executionService, com.lexmark.saperion.search.query.Statement statement, com.lexmark.saperion.search.PageDefinition paging)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      static <ItemType> java.lang.Iterable<ItemType> list​(com.lexmark.saperion.search.SearchExecutionService<ItemType> executionService)  
      static <ItemType> java.lang.Iterable<ItemType> list​(com.lexmark.saperion.search.SearchExecutionService<ItemType> executionService, com.lexmark.saperion.search.query.Statement statement, com.lexmark.saperion.search.PageDefinition paging)  
      T next()  
      void remove()  
      • 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
    • Constructor Detail

      • SearchResultIterator

        public SearchResultIterator​(com.lexmark.saperion.search.SearchExecutionService<T> executionService,
                                    com.lexmark.saperion.search.query.Statement statement,
                                    com.lexmark.saperion.search.PageDefinition paging)
    • Method Detail

      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<T>
      • next

        public T next()
        Specified by:
        next in interface java.util.Iterator<T>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<T>
      • list

        public static <ItemType> java.lang.Iterable<ItemType> list​(com.lexmark.saperion.search.SearchExecutionService<ItemType> executionService)
      • list

        public static <ItemType> java.lang.Iterable<ItemType> list​(com.lexmark.saperion.search.SearchExecutionService<ItemType> executionService,
                                                                   com.lexmark.saperion.search.query.Statement statement,
                                                                   com.lexmark.saperion.search.PageDefinition paging)