Package org.duracloud.duradmin.util
Class ScrollableList<E>
- java.lang.Object
-
- org.duracloud.duradmin.util.ScrollableList<E>
-
- All Implemented Interfaces:
Scrollable<E>
public abstract class ScrollableList<E> extends Object implements Scrollable<E>
-
-
Constructor Summary
Constructors Constructor Description ScrollableList()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidfirst()protected abstract List<E>getData(E currentMarker)longgetMaxResultsPerPage()The max number of results per page; ie the page size.List<E>getResultList()Returns the results for the current "page"booleanisNextAvailable()booleanisPreviousAvailable()voidmarkForUpdate()voidnext()voidprevious()voidsetMaxResultsPerPage(int maxResults)protected voidupdate()
-
-
-
Method Detail
-
getMaxResultsPerPage
public long getMaxResultsPerPage()
Description copied from interface:ScrollableThe max number of results per page; ie the page size.- Specified by:
getMaxResultsPerPagein interfaceScrollable<E>- Returns:
-
markForUpdate
public void markForUpdate()
-
setMaxResultsPerPage
public void setMaxResultsPerPage(int maxResults)
- Specified by:
setMaxResultsPerPagein interfaceScrollable<E>
-
next
public void next()
-
first
public void first()
- Specified by:
firstin interfaceScrollable<E>
-
previous
public void previous()
- Specified by:
previousin interfaceScrollable<E>
-
isPreviousAvailable
public boolean isPreviousAvailable()
- Specified by:
isPreviousAvailablein interfaceScrollable<E>
-
isNextAvailable
public boolean isNextAvailable()
-
getResultList
public List<E> getResultList()
Description copied from interface:ScrollableReturns the results for the current "page"- Specified by:
getResultListin interfaceScrollable<E>- Returns:
-
update
protected final void update() throws DataRetrievalException- Throws:
DataRetrievalException
-
getData
protected abstract List<E> getData(E currentMarker) throws DataRetrievalException
- Throws:
DataRetrievalException
-
-