public abstract class AbstractListAccess<E> extends Object implements org.exoplatform.commons.utils.ListAccess<E>
| Modifier and Type | Field and Description |
|---|---|
protected int |
size |
| Constructor and Description |
|---|
AbstractListAccess() |
| Modifier and Type | Method and Description |
|---|---|
int |
getCurrentPage()
Get the currentPage of page list access
|
int |
getFrom()
Get fromIndex of page
|
int |
getOffset()
Get current offset
|
int |
getOffset(int page)
Get the offset by page
|
int |
getPageSize()
Get the page size of page list access
|
int |
getTo()
Get toIndex of page
|
int |
getTotalPages()
Get total page of page list access
|
void |
initialize(int pageSize,
int pageSelect)
Initialize page list access
|
abstract E[] |
load(int pageSelect) |
void |
reCalculate(int offset,
int limit)
Re-calculate the value of currentPage
|
void |
setCurrentPage(int page)
Set the currentPage of page list access
|
void |
setPageSize(int pageSize)
Set the page size of page list access
|
public abstract E[] load(int pageSelect) throws Exception, IllegalArgumentException
ExceptionIllegalArgumentExceptionpublic void reCalculate(int offset,
int limit)
offset - limit - public void initialize(int pageSize,
int pageSelect)
throws Exception
pageSize - pageSelect - Exceptionpublic int getTotalPages()
throws Exception
Exceptionpublic int getPageSize()
public void setPageSize(int pageSize)
pageSize - public int getCurrentPage()
public void setCurrentPage(int page)
page - public int getOffset(int page)
page - public int getOffset()
public int getFrom()
public int getTo()
Copyright © 2003–2022 eXo Platform SAS. All rights reserved.