org.duracloud.common.util
Interface Scrollable<E>


public interface Scrollable<E>

A simple interface for lists supporting scrollable behavior result sets.

Version:
$Id: Scrollable.java 2 2010-06-24 20:01:55Z bbranan $
Author:
Danny Bernstein

Method Summary
 long getFirstResultIndex()
           
 int getMaxResultsPerPage()
          The max number of results per page; ie the page size.
 long getResultCount()
          The total result count
 java.util.List<E> getResultList()
          Returns the results for the current "page"
 void setFirstResultIndex(long index)
          Sets the starting index for the page.
 void setMaxResultsPerPage(int maxResults)
           
 

Method Detail

getResultCount

long getResultCount()
The total result count

Returns:

getMaxResultsPerPage

int getMaxResultsPerPage()
The max number of results per page; ie the page size.

Returns:

setMaxResultsPerPage

void setMaxResultsPerPage(int maxResults)

setFirstResultIndex

void setFirstResultIndex(long index)
                         throws java.lang.IndexOutOfBoundsException
Sets the starting index for the page.

Parameters:
index - The absolute item index.
Throws:
java.lang.IndexOutOfBoundsException

getFirstResultIndex

long getFirstResultIndex()

getResultList

java.util.List<E> getResultList()
Returns the results for the current "page"

Returns:


Copyright © 2009-2011 DuraSpace. All Rights Reserved.