Class ItemLookupResult<T>


  • public class ItemLookupResult<T>
    extends java.lang.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 Detail

      • createFrom

        public static <T> ItemLookupResult<T> createFrom​(java.util.List<T> entries,
                                                         int totalCount)
      • createFrom

        public static <T> ItemLookupResult<T> createFrom​(java.util.List<T> entries)
      • getEntries

        public java.util.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​(java.util.function.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.