Package org.exoplatform.commons.utils
Class PageList<E>
- java.lang.Object
-
- org.exoplatform.commons.utils.PageList<E>
-
- Direct Known Subclasses:
LazyPageList,ObjectPageList
public abstract class PageList<E> extends Object
Deprecated.Subclasses of this object should be replaced by thesubclassand an implementation of theListAccessinterface.- Since:
- Oct 21, 2004
- Version:
- $Id: PageList.java,v 1.2 2004/10/25 03:36:58 tuan08 Exp $
- Author:
- Tuan Nguyen (tuan08@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description protected intavailable_Deprecated.protected intavailablePage_Deprecated.protected List<E>currentListPage_Deprecated.protected intcurrentPage_Deprecated.static PageListEMPTY_LISTDeprecated.
-
Constructor Summary
Constructors Constructor Description PageList(int pageSize)Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcheckAndSetPage(int page)Deprecated.List<E>currentPage()Deprecated.abstract List<E>getAll()Deprecated.intgetAvailable()Deprecated.Returns the number of available elements.intgetAvailablePage()Deprecated.Returns the number of available pages.intgetCurrentPage()Deprecated.Returns the current page index.intgetFrom()Deprecated.Returns the from index.List<E>getPage(int page)Deprecated.Updates the current page index and retrieves the element from that page.intgetPageSize()Deprecated.Returns the page size.intgetTo()Deprecated.Returns the to index.protected abstract voidpopulateCurrentPage(int page)Deprecated.protected voidsetAvailablePage(int available)Deprecated.voidsetPageSize(int pageSize)Deprecated.Updates the page size.
-
-
-
Method Detail
-
getPageSize
public int getPageSize()
Deprecated.Returns the page size.- Returns:
- the page size
-
setPageSize
public void setPageSize(int pageSize)
Deprecated.Updates the page size.- Parameters:
pageSize- the new page size value
-
getCurrentPage
public int getCurrentPage()
Deprecated.Returns the current page index.- Returns:
- the current page
-
getAvailable
public int getAvailable()
Deprecated.Returns the number of available elements.- Returns:
- the available elements
-
getAvailablePage
public int getAvailablePage()
Deprecated.Returns the number of available pages.- Returns:
- the available pages
-
populateCurrentPage
protected abstract void populateCurrentPage(int page) throws ExceptionDeprecated.- Throws:
Exception
-
getPage
public List<E> getPage(int page) throws Exception
Deprecated.Updates the current page index and retrieves the element from that page.- Parameters:
page- the page index- Returns:
- the list of element of the page
- Throws:
Exception- an exception
-
checkAndSetPage
protected void checkAndSetPage(int page) throws ExceptionDeprecated.- Throws:
Exception
-
setAvailablePage
protected void setAvailablePage(int available)
Deprecated.
-
getFrom
public int getFrom()
Deprecated.Returns the from index.- Returns:
- the from index
-
getTo
public int getTo()
Deprecated.Returns the to index.- Returns:
- the to index
-
-