|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.faq.service.JCRPageList
public abstract class JCRPageList
Abstract class JCRPageList provide functions for pagination when view question content in web page.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
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 |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long available_
protected long availablePage_
protected long currentPage_
protected List<Question> currentListPage_
protected List currentListObject_
protected List<Category> currentListCategory_
protected List<ObjectSearchResult> currentListResultSearch_
protected List<Watch> currentListWatch_
| Constructor Detail |
|---|
public JCRPageList(long pageSize)
pageSize - the number of object per page| Method Detail |
|---|
public 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 user
Exception - the exception
public 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 page
questions - List questions is used to updateisUpdate - is true if want update questions in current page
is false if want delete questions in current page
Exception - the exception
protected abstract void populateCurrentPage(long page,
String username)
throws Exception
page - index of page is viewedusername - the name of user
Exception - the exception
public List<Question> getPage(long page,
String username)
throws Exception
page - the index of page want processusername - the name of user
Exception - if index of page is less than 0 or larger than max
protected abstract void populateCurrentPageItem(long page)
throws Exception
Exception
public List getPageItem(long page)
throws Exception
Exception
protected abstract void populateCurrentPageResultSearch(long page,
String username)
throws Exception
Exception
public List<ObjectSearchResult> getPageResultSearch(long page,
String username)
throws Exception
Exception
protected abstract void populateCurrentPageCategoriesSearch(long page,
String username)
throws Exception
Exception
public List<Category> getPageResultCategoriesSearch(long page,
String username)
throws Exception
Exception
protected abstract void populateCurrentPageQuestionsSearch(long page,
String username)
throws Exception
Exception
public List<Question> getPageResultQuestionsSearch(long page,
String username)
throws Exception
Exception
protected abstract void populateCurrentPageCategoriesQuestionsSearch(long page,
String username)
throws Exception
Exception
public List<Object> getPageListCategoriesQuestions(long page,
String username)
throws Exception
Exception
protected abstract void populateCurrentPageWatch(long page,
String username)
throws Exception
Exception
public List<Watch> getPageListWatch(long page,
String username)
throws Exception
Exception
public 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 exception
page - 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||