Package io.jmix.search.searching
Interface SearchResult
- All Known Implementing Classes:
- SearchResultImpl
public interface SearchResult
Represents result of search by some text.
- 
Method SummaryModifier and TypeMethodDescriptionCreates newSearchContextbased on current one and describes next-page searchGets allSearchResultEntryintGets search offset currently applied to load content of thisSearchResultincluding post-load security filtrationGets names of all entities presented in thisSearchResult.getEntriesByEntityName(String entityName) Gets allSearchResultEntryspecific for provided entity.GetsSearchContextthat was used to gain thisSearchResult.GetsSearchStrategythat was used to gain thisSearchResult.Gets text search has been performed with.intgetSize()Gets amount of objects in thisSearchResultlongGets total amount of hits in thisSearchResult.booleanisEmpty()Checks if there is any data in result.booleanChecks if there are more objects suitable for next-page search.voidsetTotalHits(long totalHits) Sets the total number of hits for thisSearchResult.
- 
Method Details- 
getSizeint getSize()Gets amount of objects in thisSearchResult- Returns:
- amount of objects
 
- 
getEffectiveOffsetint getEffectiveOffset()Gets search offset currently applied to load content of thisSearchResultincluding post-load security filtrationUse this offset to perform next-page search. - Returns:
- effective offset
 
- 
getTotalHitslong getTotalHits()Gets total amount of hits in thisSearchResult.- Returns:
- total hits
 
- 
setTotalHitsvoid setTotalHits(long totalHits) Sets the total number of hits for thisSearchResult.- Parameters:
- totalHits- the total number of hits to be set.
 
- 
getEntityNamesCollection<String> getEntityNames()Gets names of all entities presented in thisSearchResult.- Returns:
- collection of entity names
 
- 
getEntriesByEntityNameGets allSearchResultEntryspecific for provided entity.- Parameters:
- entityName- entity name
- Returns:
- collection of SearchResultEntry
 
- 
getAllEntriesCollection<SearchResultEntry> getAllEntries()Gets allSearchResultEntry- Returns:
- collection of SearchResultEntry
 
- 
getSearchTextString getSearchText()Gets text search has been performed with.- Returns:
- search text
 
- 
getSearchContextSearchContext getSearchContext()GetsSearchContextthat was used to gain thisSearchResult.- Returns:
- SearchContext
 
- 
isEmptyboolean isEmpty()Checks if there is any data in result.- Returns:
- true if this SearchResultcontains anySearchResultEntry, false otherwise
 
- 
isMoreDataAvailableboolean isMoreDataAvailable()Checks if there are more objects suitable for next-page search.- Returns:
- true if index contains more suitable data, false otherwise
 
- 
getSearchStrategyString getSearchStrategy()GetsSearchStrategythat was used to gain thisSearchResult.- Returns:
- SearchStrategy
 
- 
createNextPageSearchContextSearchContext createNextPageSearchContext()Creates newSearchContextbased on current one and describes next-page search- Returns:
- SearchContext
 
 
-