Class ItemLookupResult<T>
java.lang.Object
de.hybris.platform.odata2services.odata.persistence.lookup.ItemLookupResult<T>
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 Summary
Modifier and TypeMethodDescriptionstatic <T> ItemLookupResult<T>createFrom(SearchResult<T> result) static <T> ItemLookupResult<T>createFrom(List<T> entries) static <T> ItemLookupResult<T>createFrom(List<T> entries, int totalCount) Retrieves items existing in the platform and matching the request conditions.intRetrieves total number of items matching the request conditions and existing in the platform<R> ItemLookupResult<R>Transforms this result into a result containing different kind of entries.
-
Method Details
-
createFrom
-
createFrom
-
createFrom
-
getEntries
Retrieves items existing in the platform and matching the request conditions.- Returns:
- all items matching the
ItemLookupRequestconditions 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
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.
-