public abstract class JCRPageList extends Object
| Modifier and Type | Field and Description |
|---|---|
protected long |
available_ |
protected long |
availablePage_ |
protected List<Category> |
currentListCategory_ |
protected List |
currentListObject_ |
protected List<Question> |
currentListPage_ |
protected List<ObjectSearchResult> |
currentListResultSearch_ |
protected List<Watch> |
currentListWatch_ |
protected long |
currentPage_ |
| Constructor and Description |
|---|
JCRPageList(long pageSize)
Constructor set pagesize for JCRPageList, pagesize is number of objects per page
for example: pagesize = 10 it's mean view 10 object per page
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAndSetPage(long page)
Check the index of page, if
page is less than max and larger than 0
then set page to be current page else throw exception |
List<Question> |
currentPage(String username)
Get objects (question objects) is viewed in current page
|
abstract List<Question> |
getAll()
abstract function to get all question.
|
long |
getAvailable()
Get total of questions in list questions are contained
|
long |
getAvailablePage()
Get total pages
|
long |
getCurrentPage()
Get index of current page which is viewing
|
String |
getObjectId() |
List<Question> |
getPage(long page,
String username)
get list questions are viewed in page which have index is specified.
|
List |
getPageItem(long page) |
long |
getPageJump() |
List<Object> |
getPageListCategoriesQuestions(long page,
String username) |
List<Watch> |
getPageListWatch(long page,
String username) |
List<Category> |
getPageResultCategoriesSearch(long page,
String username) |
List<Question> |
getPageResultQuestionsSearch(long page,
String username) |
List<ObjectSearchResult> |
getPageResultSearch(long page,
String username) |
long |
getPageSize()
Get page size, return number of quesitons per page
|
protected abstract void |
populateCurrentPage(long page,
String username)
Abstract funtion, get list question to view in current page
|
protected abstract void |
populateCurrentPageCategoriesQuestionsSearch(long page,
String username) |
protected abstract void |
populateCurrentPageCategoriesSearch(long page,
String username) |
protected abstract void |
populateCurrentPageItem(long page) |
protected abstract void |
populateCurrentPageQuestionsSearch(long page,
String username) |
protected abstract void |
populateCurrentPageResultSearch(long page,
String username) |
protected abstract void |
populateCurrentPageWatch(long page,
String username) |
protected void |
setAvailablePage(long available)
Sets the available page.
|
abstract void |
setList(List<Question> questions)
abtract funtion, set list question to view
|
void |
setObjectId(String id) |
void |
setPageJump(long pageJump) |
void |
setPageSize(long pageSize)
Set pagesize for JCRPageList, pagesize is number of objects per page
for example: pagesize = 10 it's mean view 10 object per page
|
void |
setQuestion(List<Question> questions,
boolean isUpdate)
Set questions for current page.
|
protected long available_
protected long availablePage_
protected long currentPage_
protected List currentListObject_
protected List<ObjectSearchResult> currentListResultSearch_
public JCRPageList(long pageSize)
pageSize - the number of object per pagepublic String getObjectId()
public void setObjectId(String id)
public long getPageSize()
public void setPageSize(long pageSize)
pageSize - the number of object per pagepublic long getCurrentPage()
public long getAvailable()
public long getAvailablePage()
public List<Question> currentPage(String username) throws Exception
username - the name of current userException - the exceptionpublic void setQuestion(List<Question> questions, boolean isUpdate) throws Exception
isUpdate is true then change list question in current page
by list quetions are specified, else delete all quesiton is viewed in current pagequestions - List questions is used to updateisUpdate - is true if want update questions in current page
is false if want delete questions in current pageException - the exceptionprotected abstract void populateCurrentPage(long page,
String username)
throws Exception
page - index of page is viewedusername - the name of userException - the exceptionpublic List<Question> getPage(long page, String username) throws Exception
page - the index of page want processusername - the name of userException - if index of page is less than 0 or larger than maxprotected abstract void populateCurrentPageItem(long page)
throws Exception
Exceptionprotected abstract void populateCurrentPageResultSearch(long page,
String username)
throws Exception
Exceptionpublic List<ObjectSearchResult> getPageResultSearch(long page, String username) throws Exception
Exceptionprotected abstract void populateCurrentPageCategoriesSearch(long page,
String username)
throws Exception
Exceptionpublic List<Category> getPageResultCategoriesSearch(long page, String username) throws Exception
Exceptionprotected abstract void populateCurrentPageQuestionsSearch(long page,
String username)
throws Exception
Exceptionpublic List<Question> getPageResultQuestionsSearch(long page, String username) throws Exception
Exceptionprotected abstract void populateCurrentPageCategoriesQuestionsSearch(long page,
String username)
throws Exception
Exceptionpublic List<Object> getPageListCategoriesQuestions(long page, String username) throws Exception
Exceptionprotected abstract void populateCurrentPageWatch(long page,
String username)
throws Exception
Exceptionpublic List<Watch> getPageListWatch(long page, String username) throws Exception
Exceptionpublic abstract List<Question> getAll() throws Exception
Exception - if question node not foundpublic abstract void setList(List<Question> questions)
questions - list questionprotected void checkAndSetPage(long page)
page is less than max and larger than 0
then set page to be current page else throw exceptionpage - index of pageprotected void setAvailablePage(long available)
available to set
total pages for pagination.available - the number of objectspublic void setPageJump(long pageJump)
public long getPageJump()
Copyright © 2003–2018 eXo Platform SAS. All rights reserved.