Class SearchResponseImpl<T>
- java.lang.Object
-
- org.uberfire.ext.security.management.impl.SearchResponseImpl<T>
-
- All Implemented Interfaces:
AbstractEntityManager.SearchResponse<T>
@Portable public class SearchResponseImpl<T> extends Object implements AbstractEntityManager.SearchResponse<T>
A default search response implementation for the users system management.
- Since:
- 0.8.0
-
-
Constructor Summary
Constructors Constructor Description SearchResponseImpl()SearchResponseImpl(List<T> results, int page, int pageSize, int total, boolean hasNextPage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPage()The page number for the search cursor.intgetPageSize()The number of items for each page.List<T>getResults()The entities resulting from the search operation.StringgetSearchPattern()The search pattern string.intgetTotal()The total entities count.booleanhasNextPage()Indicates if there are more results (next pages).
-
-
-
Method Detail
-
getResults
public List<T> getResults()
Description copied from interface:AbstractEntityManager.SearchResponseThe entities resulting from the search operation.
- Specified by:
getResultsin interfaceAbstractEntityManager.SearchResponse<T>- Returns:
- The entities resulting from the search operation.
-
getTotal
public int getTotal()
Description copied from interface:AbstractEntityManager.SearchResponseThe total entities count.
- Specified by:
getTotalin interfaceAbstractEntityManager.SearchResponse<T>- Returns:
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.
-
hasNextPage
public boolean hasNextPage()
Description copied from interface: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.- Specified by:
hasNextPagein interfaceAbstractEntityManager.SearchResponse<T>- Returns:
- Indicates if there are more results (next pages).
-
getSearchPattern
public String getSearchPattern()
Description copied from interface:AbstractEntityManager.SearchResponseThe search pattern string.
- Specified by:
getSearchPatternin interfaceAbstractEntityManager.SearchResponse<T>- Returns:
- The search pattern.
-
getPage
public int getPage()
Description copied from interface:AbstractEntityManager.SearchResponseThe page number for the search cursor.
IMPORTANT NOTE: Page number starts with value
1.- Specified by:
getPagein interfaceAbstractEntityManager.SearchResponse<T>- Returns:
- The page for the returned results.
-
getPageSize
public int getPageSize()
Description copied from interface:AbstractEntityManager.SearchResponseThe number of items for each page.
- Specified by:
getPageSizein interfaceAbstractEntityManager.SearchResponse<T>- Returns:
- The page size.
-
-