Interface SearchResult

All Known Implementing Classes:
SearchResultImpl

public interface SearchResult
Represents result of search by some text.
  • Method Details

    • getSize

      int getSize()
      Gets amount of objects in this SearchResult
      Returns:
      amount of objects
    • getEffectiveOffset

      int getEffectiveOffset()
      Gets search offset currently applied to load content of this SearchResult including post-load security filtration

      Use this offset to perform next-page search.

      Returns:
      effective offset
    • getTotalHits

      long getTotalHits()
      Gets total amount of hits in this SearchResult.
      Returns:
      total hits
    • setTotalHits

      void setTotalHits(long totalHits)
      Sets the total number of hits for this SearchResult.
      Parameters:
      totalHits - the total number of hits to be set.
    • getEntityNames

      Collection<String> getEntityNames()
      Gets names of all entities presented in this SearchResult.
      Returns:
      collection of entity names
    • getEntriesByEntityName

      Collection<SearchResultEntry> getEntriesByEntityName(String entityName)
      Gets all SearchResultEntry specific for provided entity.
      Parameters:
      entityName - entity name
      Returns:
      collection of SearchResultEntry
    • getAllEntries

      Collection<SearchResultEntry> getAllEntries()
      Returns:
      collection of SearchResultEntry
    • getSearchText

      String getSearchText()
      Gets text search has been performed with.
      Returns:
      search text
    • getSearchContext

      SearchContext getSearchContext()
      Gets SearchContext that was used to gain this SearchResult.
      Returns:
      SearchContext
    • isEmpty

      boolean isEmpty()
      Checks if there is any data in result.
      Returns:
      true if this SearchResult contains any SearchResultEntry, false otherwise
    • isMoreDataAvailable

      boolean isMoreDataAvailable()
      Checks if there are more objects suitable for next-page search.
      Returns:
      true if index contains more suitable data, false otherwise
    • getSearchStrategy

      String getSearchStrategy()
      Gets SearchStrategy that was used to gain this SearchResult.
      Returns:
      SearchStrategy
    • createNextPageSearchContext

      SearchContext createNextPageSearchContext()
      Creates new SearchContext based on current one and describes next-page search
      Returns:
      SearchContext