Class GenericSearchQuery

java.lang.Object
de.hybris.platform.servicelayer.search.AbstractQuery
de.hybris.platform.genericsearch.GenericSearchQuery

public class GenericSearchQuery extends AbstractQuery

The GenericSearchQuery stores all needed informations (the query itself, parameters, ...) to execute a search in the GenericSearchService.

Please note that this class is not thread-safe and not intended to be living longer than one request.

  • Constructor Details

    • GenericSearchQuery

      public GenericSearchQuery(GenericQuery query)
  • Method Details

    • getQuery

      public GenericQuery getQuery()
      Returns GenericQuery object related with current GenericSearchQuery object.
    • getRangeCount

      @Deprecated(since="ages", forRemoval=true) public int getRangeCount()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since ages - useAbstractQuery.getCount() instead.
      Returns:
      the number of elements in this search range. Default value is -1 which means all elements.
    • getRangeStart

      @Deprecated(since="ages", forRemoval=true) public int getRangeStart()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since ages - useAbstractQuery.getStart() instead.
      Default value for the start range is 0 (first element).
      Returns:
      the start number of the search range.
    • isDontNeedTotal

      @Deprecated(since="ages", forRemoval=true) public boolean isDontNeedTotal()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since ages - useAbstractQuery.isNeedTotal() instead (remember that this method works opposite).
      Returns:
      false if the search returns all found result objects at once.
    • setDontNeedTotal

      @Deprecated(since="ages", forRemoval=true) public void setDontNeedTotal(boolean dontNeedTotal)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since ages - useAbstractQuery.setNeedTotal(boolean) instead (remember that this method works opposite).
      Set this dontNeedTotal to false if the search should return all result objects at once. The default value is true.
      Parameters:
      dontNeedTotal - For larger results set this value to true (default) for optimized query processing.
    • setRangeCount

      @Deprecated(since="ages", forRemoval=true) public void setRangeCount(int rangeCount)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since ages - useAbstractQuery.setCount(int) instead.
      Set the number of elements in the search range. Attention with the default value isDontNeedTotal()= true! The total count of the result will be equal to this value. The default value is -1 which means all elements.
      Parameters:
      rangeCount - Sets the number of elements for the search range.
    • setRangeStart

      @Deprecated(since="ages", forRemoval=true) public void setRangeStart(int rangeStart)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since ages - useAbstractQuery.setStart(int) instead.
      Sets the start number of the search range.