Interface Pageable<R>
-
- All Superinterfaces:
IdentifiableSearchQuery
- All Known Subinterfaces:
FullTextSearchPageable<R>
- All Known Implementing Classes:
PageableList,PageableWithFullTextDataCallback
public interface Pageable<R> extends IdentifiableSearchQuery
Capable of paging the collections of result typeR.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.List<R>getAllResults()Returns all results on all pages.java.util.List<R>getCurrentPage()Gets the entries of the current record.intgetPageNumber()Returns the active page number.intgetPageSize()Returns the page size.SortDatagetSortData()Returns sort related informationintgetTotalCount()Returns count of all items in the collection that is being paged.java.lang.StringgetTypeCode()Returns the "common" type code of all entries.booleanhasNextPage()Determines if there is a next page.booleanhasPreviousPage()Determines if there is a previous page.java.util.List<R>nextPage()Gets the entries of the next record page and updates the current page number (seegetCurrentPage()).java.util.List<R>previousPage()Get the entries of the previous page and updates the current page number (seegetCurrentPage()).voidrefresh()Refreshes current page.voidsetPageNumber(int pageNo)Sets the active page number.java.util.List<R>setPageSize(int pageSize)Changes the page size and returns the current page with a new page size.default voidsetQueryId(java.lang.String queryId)voidsetSortData(SortData sortData)-
Methods inherited from interface com.hybris.cockpitng.search.data.IdentifiableSearchQuery
getQueryId
-
-
-
-
Method Detail
-
getCurrentPage
java.util.List<R> getCurrentPage()
Gets the entries of the current record.- Returns:
- all entries of the current record page
-
refresh
void refresh()
Refreshes current page.
-
nextPage
java.util.List<R> nextPage()
Gets the entries of the next record page and updates the current page number (seegetCurrentPage()).- Returns:
- all entries of the next record page or an empty list if
hasNextPage()returns false
-
previousPage
java.util.List<R> previousPage()
Get the entries of the previous page and updates the current page number (seegetCurrentPage()).- Returns:
- List of
RESULTor empty list ifhasPreviousPage()returns false.
-
hasNextPage
boolean hasNextPage()
Determines if there is a next page.- Returns:
- boolean
-
hasPreviousPage
boolean hasPreviousPage()
Determines if there is a previous page.- Returns:
- boolean
-
getPageSize
int getPageSize()
Returns the page size.- Returns:
- integer
-
getTypeCode
java.lang.String getTypeCode()
Returns the "common" type code of all entries.- Returns:
- the common type code or null if no common type code can be applied
-
setPageSize
java.util.List<R> setPageSize(int pageSize)
Changes the page size and returns the current page with a new page size.- Parameters:
pageSize- - new page size- Returns:
ListofRESULTor empty list.
-
getTotalCount
int getTotalCount()
Returns count of all items in the collection that is being paged.- Returns:
- total items count
-
getPageNumber
int getPageNumber()
Returns the active page number.- Returns:
- the active page number
-
setPageNumber
void setPageNumber(int pageNo)
Sets the active page number.
-
getSortData
SortData getSortData()
Returns sort related information- Returns:
- sort related information
-
setSortData
void setSortData(SortData sortData)
- Parameters:
sortData- sort related information
-
getAllResults
java.util.List<R> getAllResults()
Returns all results on all pages. May be a long lasting operation for big data sets, therefore should be used carefully.- Returns:
-
setQueryId
default void setQueryId(java.lang.String queryId)
- Parameters:
queryId- Queries with same identifiers are assumed to perform same request to data source
-
-