public interface IDirectoryPagingCookie
IDirectorySession.searchDirectory(String, int, DirectorySearchQuery, IDirectoryPagingCookie)
API to page through search results
Before use this cookie is created by IDirectorySession.createPagingCookie(String)
call, after use the cookie
must be destroyed by IDirectorySession.destroyPagingCookie(IDirectoryPagingCookie)
.
The minimal setup cookie is required before first use is to set start index setStart(int)
and
page size setPageSize(int)
. The cookie is then passed to searchDirectory() API. To page through
result set use pageForward()
and pageBackward()
methods of the cookie.
Modifier and Type | Method and Description |
---|---|
int |
getEnd()
The index of the last item in the current page.
|
boolean |
getOrderAtoZ()
Returns true if the list is ordered ascending (a-z or 1-10).
|
int |
getPageCount()
The total number of pages in the list.
|
int |
getPageIndex()
The index of the current page.
|
int |
getPageSize()
The maximum number of items in the current page.
|
IPagingCookie |
getPagingCookie()
Returns the inner IPagingCookie of this wrapper
|
String |
getSort()
The sort key by which the list is sorted (ex: 'name').
|
int |
getStart()
The index of the first item in the current page.
|
int |
getTotal()
The total number of items in the list.
|
boolean |
hasNext()
True if the list can page forward.
|
boolean |
hasPrevious()
True if the list can page back.
|
void |
pageBackward()
Pages the cookie backward.
|
void |
pageForward()
Pages the cookie forward.
|
void |
setEnd(int end)
The index of the last item in the current page.
|
void |
setOrderAtoZ(boolean order)
Sets ascending/descending order
|
void |
setPageIndex(int pageIndex)
The index of the current page.
|
void |
setPageSize(int pageSize)
The maximum number of items in the current page.
|
void |
setSort(String sortKey)
The sort key by which the list is sorted (ex: 'name').
|
void |
setStart(int start)
The index of the first item in the current page.
|
boolean hasPrevious()
boolean hasNext()
int getStart()
void setStart(int start)
start
- The index of the first item in the current page.int getEnd()
void setEnd(int end)
end
- The index of the of the last item in the current page.int getTotal()
int getPageSize()
void setPageSize(int pageSize)
pageSize
- The maximum number of items in the current page.int getPageIndex()
void setPageIndex(int pageIndex)
pageIndex
- The index of the current page.int getPageCount()
String getSort()
void setSort(String sortKey)
sortKey
- The sort key by which the list is sorted (ex: 'name').boolean getOrderAtoZ()
void setOrderAtoZ(boolean order)
order
- void pageForward() throws DirectoryException
PortalException
- if the cookie cannot page forward.DirectoryException
void pageBackward() throws DirectoryException
PortalException
- if the cookie cannot page backward.DirectoryException
IPagingCookie getPagingCookie()