Changed getFirstItem() of Pageable to getOffset().

This commit is contained in:
Oliver Gierke
2010-12-29 18:03:34 +01:00
parent 5ce44ec4e7
commit aacb129658
2 changed files with 5 additions and 4 deletions

View File

@@ -110,7 +110,7 @@ public class PageRequest implements Pageable {
* *
* @see org.springframework.data.domain.Pageable#getFirstItem() * @see org.springframework.data.domain.Pageable#getFirstItem()
*/ */
public int getFirstItem() { public int getOffset() {
return page * size; return page * size;
} }

View File

@@ -39,11 +39,12 @@ public interface Pageable {
/** /**
* Returns the first item relatively to the total number of items. * Returns the offset to be taken according to the underlying page and page
* size.
* *
* @return the first item to be returned * @return the offset to be taken
*/ */
int getFirstItem(); int getOffset();
/** /**