Class QueryContainer

java.lang.Object
org.ctan.site.services.search.QueryContainer

public class QueryContainer extends Object
This class is a command object for passing search relevant parameters to the SearchService and keeping the associated search results.
  • Constructor Details

    • QueryContainer

      public QueryContainer()
  • Method Details

    • getLocale

      public Locale getLocale(@NonNull @NonNull Locale fallback)
      The method getLocale provides means to get the language of the fallback if the locale is null.
      Parameters:
      fallback - the fallback value
      Returns:
      null-safe locale
    • hasType

      public boolean hasType(String key)
      The method hasType provides means to retrieve a type for a given key.
      Parameters:
      key - the key
      Returns:
      the matching type
    • resetHits

      public QueryContainer resetHits()
      The method resetHits provides means to reinitialise the hits.
      Returns:
      this
    • setType

      public Boolean setType(String key, Boolean value)
      The method setType provides means to set the value of a given type.
      Parameters:
      key - the key of the type
      value - the value of the type
      Returns:
      the old value