Package io.jmix.search.searching.impl
Class SearchResultImpl
java.lang.Object
io.jmix.search.searching.impl.SearchResultImpl
- All Implemented Interfaces:
- SearchResult
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final Collection<SearchResultEntry>protected intprotected final Map<String,Collection<SearchResultEntry>> protected booleanprotected SearchContextprotected Stringprotected intprotected long
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddEntry(SearchResultEntry searchResultEntry) Creates 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.voidbooleanisEmpty()Checks if there is any data in result.booleanChecks if there are more objects suitable for next-page search.voidsetMoreDataAvailable(boolean moreDataAvailable) voidsetTotalHits(long totalHits) Sets the total number of hits for thisSearchResult.
- 
Field Details- 
searchContext
- 
entriesByEntityName
- 
allEntries
- 
sizeprotected int size
- 
totalHitsprotected long totalHits
- 
effectiveOffsetprotected int effectiveOffset
- 
moreDataAvailableprotected boolean moreDataAvailable
- 
searchStrategy
 
- 
- 
Constructor Details- 
SearchResultImpl
 
- 
- 
Method Details- 
addEntry
- 
getEntriesByEntityNameDescription copied from interface:SearchResultGets allSearchResultEntryspecific for provided entity.- Specified by:
- getEntriesByEntityNamein interface- SearchResult
- Parameters:
- entityName- entity name
- Returns:
- collection of SearchResultEntry
 
- 
getAllEntriesDescription copied from interface:SearchResultGets allSearchResultEntry- Specified by:
- getAllEntriesin interface- SearchResult
- Returns:
- collection of SearchResultEntry
 
- 
isEmptypublic boolean isEmpty()Description copied from interface:SearchResultChecks if there is any data in result.- Specified by:
- isEmptyin interface- SearchResult
- Returns:
- true if this SearchResultcontains anySearchResultEntry, false otherwise
 
- 
getEntityNamesDescription copied from interface:SearchResultGets names of all entities presented in thisSearchResult.- Specified by:
- getEntityNamesin interface- SearchResult
- Returns:
- collection of entity names
 
- 
getSearchTextDescription copied from interface:SearchResultGets text search has been performed with.- Specified by:
- getSearchTextin interface- SearchResult
- Returns:
- search text
 
- 
getSizepublic int getSize()Description copied from interface:SearchResultGets amount of objects in thisSearchResult- Specified by:
- getSizein interface- SearchResult
- Returns:
- amount of objects
 
- 
getTotalHitspublic long getTotalHits()Description copied from interface:SearchResultGets total amount of hits in thisSearchResult.- Specified by:
- getTotalHitsin interface- SearchResult
- Returns:
- total hits
 
- 
setTotalHitspublic void setTotalHits(long totalHits) Description copied from interface:SearchResultSets the total number of hits for thisSearchResult.- Specified by:
- setTotalHitsin interface- SearchResult
- Parameters:
- totalHits- the total number of hits to be set.
 
- 
getEffectiveOffsetpublic int getEffectiveOffset()Description copied from interface:SearchResultGets search offset currently applied to load content of thisSearchResultincluding post-load security filtrationUse this offset to perform next-page search. - Specified by:
- getEffectiveOffsetin interface- SearchResult
- Returns:
- effective offset
 
- 
incrementOffsetpublic void incrementOffset()
- 
getSearchContextDescription copied from interface:SearchResultGetsSearchContextthat was used to gain thisSearchResult.- Specified by:
- getSearchContextin interface- SearchResult
- Returns:
- SearchContext
 
- 
isMoreDataAvailablepublic boolean isMoreDataAvailable()Description copied from interface:SearchResultChecks if there are more objects suitable for next-page search.- Specified by:
- isMoreDataAvailablein interface- SearchResult
- Returns:
- true if index contains more suitable data, false otherwise
 
- 
getSearchStrategyDescription copied from interface:SearchResultGetsSearchStrategythat was used to gain thisSearchResult.- Specified by:
- getSearchStrategyin interface- SearchResult
- Returns:
- SearchStrategy
 
- 
createNextPageSearchContextDescription copied from interface:SearchResultCreates newSearchContextbased on current one and describes next-page search- Specified by:
- createNextPageSearchContextin interface- SearchResult
- Returns:
- SearchContext
 
- 
setMoreDataAvailablepublic void setMoreDataAvailable(boolean moreDataAvailable) 
 
-