java.lang.Object
de.hybris.platform.odata2services.odata.persistence.lookup.ItemLookupResult<T>

public class ItemLookupResult<T> extends Object
Result of looking up items by the ItemLookupStrategy. This result is immutable except it does not guarantee immutability of the items returned by getEntries() method.
  • Method Details

    • createFrom

      public static <T> ItemLookupResult<T> createFrom(SearchResult<T> result)
    • createFrom

      public static <T> ItemLookupResult<T> createFrom(List<T> entries, int totalCount)
    • createFrom

      public static <T> ItemLookupResult<T> createFrom(List<T> entries)
    • getEntries

      public List<T> getEntries()
      Retrieves items existing in the platform and matching the request conditions.
      Returns:
      all items matching the ItemLookupRequest conditions or a subset of all items in case of a paged request. When no items match the conditions, an empty list is returned.
    • getTotalCount

      public int getTotalCount()
      Retrieves total number of items matching the request conditions and existing in the platform
      Returns:
      number of items matching the conditions in the platform. This number may be greater than the number of items returned by getEntries() method. Negative number indicates that total number of matching items is not calculated/unknown.
    • map

      public <R> ItemLookupResult<R> map(Function<T,R> f)
      Transforms this result into a result containing different kind of entries.
      Type Parameters:
      R - type of the entries in the transformed result
      Parameters:
      f - a function to be applied to each entry contained in this result
      Returns:
      a result containing entries, which were transformed from the original result by applying the specifed function.