Class Page
- java.lang.Object
-
- org.intermine.webservice.server.core.Page
-
public class Page extends java.lang.Object
Parameter class for passing start and limit arguments to iterators.- Author:
- Alex Kalderimis
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integer
getEnd()
java.lang.Integer
getSize()
int
getStart()
Get the index of the first row that is requested.boolean
withinRange(int index)
-
-
-
Constructor Detail
-
Page
public Page(int start, java.lang.Integer size)
Construct a new page.- Parameters:
start
- The index of the first row to return.size
- The maximum number of rows to return.
-
Page
public Page(int start)
Construct a new page, going from a certain row to the end of the result set.- Parameters:
start
- The index of the first result to return.
-
-
Method Detail
-
getStart
public int getStart()
Get the index of the first row that is requested.- Returns:
- The index of the first row to return.
-
getSize
public java.lang.Integer getSize()
- Returns:
- The requested size, or NULL if all results are requested.
-
getEnd
public java.lang.Integer getEnd()
- Returns:
- The index of the last result to be returned, or NULL if all results are requested.
-
withinRange
public boolean withinRange(int index)
- Parameters:
index
- An index to test.- Returns:
- Whether or not the given index lies within the page.
-
-