com.hlcl.rql.util.as
Class UnlinkedPagesIterator

java.lang.Object
  extended by com.hlcl.rql.util.as.UnlinkedPagesIterator

public class UnlinkedPagesIterator
extends java.lang.Object

Author:
lejafr This class encapsulate chunk reading for unlinked pages. ATTENTION: You have to delete the returned pages, otherwise you will get always the same chunk of pages!

Constructor Summary
UnlinkedPagesIterator(Project project, int chunkSize)
          Construct an iterator for unlinked page in the given project.
 
Method Summary
 boolean hasNext()
          Returns true, if another unlinked page at current index is available.
 Page next()
          Returns the next unlinked page sorted by last changed date asc.
 int pagesRead()
          Returns the number of unlinked pages read.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnlinkedPagesIterator

public UnlinkedPagesIterator(Project project,
                             int chunkSize)
                      throws RQLException
Construct an iterator for unlinked page in the given project. Chunk size should be big, otherwise will be filled with pages modified within limit only. This is because the list of unlinked pages is not sorted by modification date, instead uses creation date!

Throws:
RQLException
Method Detail

next

public Page next()
          throws RQLException
Returns the next unlinked page sorted by last changed date asc.

Throws:
RQLException

pagesRead

public int pagesRead()
              throws RQLException
Returns the number of unlinked pages read.

Throws:
RQLException

hasNext

public boolean hasNext()
                throws RQLException
Returns true, if another unlinked page at current index is available.

Throws:
RQLException