@Portable public class SearchResponseImpl<T> extends Object implements AbstractEntityManager.SearchResponse<T>
A default search response implementation for the users system management.
| Constructor and Description |
|---|
SearchResponseImpl() |
SearchResponseImpl(List<T> results,
int page,
int pageSize,
int total,
boolean hasNextPage) |
| Modifier and Type | Method and Description |
|---|---|
int |
getPage()
The page number for the search cursor.
|
int |
getPageSize()
The number of items for each page.
|
List<T> |
getResults()
The entities resulting from the search operation.
|
String |
getSearchPattern()
The search pattern string.
|
int |
getTotal()
The total entities count.
|
boolean |
hasNextPage()
Indicates if there are more results (next pages).
|
public List<T> getResults()
AbstractEntityManager.SearchResponseThe entities resulting from the search operation.
getResults in interface AbstractEntityManager.SearchResponse<T>public int getTotal()
AbstractEntityManager.SearchResponseThe total entities count.
getTotal in interface AbstractEntityManager.SearchResponse<T>By convention, if the service provider implementation class is not able to get the row count, this method should return -1.
Otherwise, returns search results count for this entity type.
public boolean hasNextPage()
AbstractEntityManager.SearchResponseIndicates if there are more results (next pages).
If the service provider implementation class is not able to return a value for getTotal, this method can be used to find out if there are more pages.
hasNextPage in interface AbstractEntityManager.SearchResponse<T>public String getSearchPattern()
AbstractEntityManager.SearchResponseThe search pattern string.
getSearchPattern in interface AbstractEntityManager.SearchResponse<T>public int getPage()
AbstractEntityManager.SearchResponseThe page number for the search cursor.
IMPORTANT NOTE: Page number starts with value 1.
getPage in interface AbstractEntityManager.SearchResponse<T>public int getPageSize()
AbstractEntityManager.SearchResponseThe number of items for each page.
getPageSize in interface AbstractEntityManager.SearchResponse<T>Copyright © 2012–2017 JBoss by Red Hat. All rights reserved.