Interface SearchResult<E>
-
- All Known Implementing Classes:
SearchResultImpl
public interface SearchResult<E>
Returned by search methods of the service layer. It contains the result collection and further informations about the search (number of hits e.g.)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getCount()
Gets size of result collection.int
getRequestedCount()
Gets requested result count.int
getRequestedStart()
Gets requested start index.java.util.List<E>
getResult()
Gets the search result.int
getTotalCount()
Gets size of collection without using range.
-
-
-
Method Detail
-
getCount
int getCount()
Gets size of result collection. Same asgetRequestedCount()
or less (if less elements are found)
-
getTotalCount
int getTotalCount()
Gets size of collection without using range. Attention: WhenAbstractQuery.isNeedTotal()
=false
(default) than this total count is the same asgetRequestedCount()
or less. It is not the total count of all elements in the db. (only when isNeedTotal=true)
-
getResult
java.util.List<E> getResult()
Gets the search result. Returned collection uses lazy translation approach, on first access on an collection element the element will be translated to an model. In case the entity was removed between gathering of search result and translation of specific element the returned collection will have anull
value at this position.
-
getRequestedStart
int getRequestedStart()
Gets requested start index. Same value as set inAbstractQuery.setStart(int)
-
getRequestedCount
int getRequestedCount()
Gets requested result count. Same value as set inAbstractQuery.setCount(int)
-
-