Class ImmutableItemSearchRequest
java.lang.Object
de.hybris.platform.integrationservices.search.ImmutableItemSearchRequest
- All Implemented Interfaces:
ItemSearchRequest
Immutable value object for representing a search request
-
Method Summary
Modifier and TypeMethodDescriptionGet accepted locale extracted from the "Accept-Language" header locale associated with the request.Specifies conditions the items to retrieve should match.Specifies conditions the items to retrieve should be ordered byRetrieves pagination specification associated with the item search.Retrieves integration item that contains key attributes of the item to be found.@NotNull TypeDescriptorSpecifies the metadata describing the requested item type.booleanSpecifies whether total number of items matching this request should be included in the response or not.booleanSpecifies whether the search response should include number of matching items only.static ItemSearchRequestBuilderInstantiates a new builder for creating instances of anImmutableItemSearchRequeststatic ItemSearchRequestBuilderInstantiates a new builder for creating instances of anImmutableItemSearchRequestfrom an existingItemSearchRequest
-
Method Details
-
itemSearchRequestBuilder
Instantiates a new builder for creating instances of anImmutableItemSearchRequest- Returns:
- the
ItemSearchRequestBuilder
-
itemSearchRequestBuilder
Instantiates a new builder for creating instances of anImmutableItemSearchRequestfrom an existingItemSearchRequest- Parameters:
request- An existing request to build from- Returns:
- the
ItemSearchRequestBuilder
-
getPaginationParameters
Description copied from interface:ItemSearchRequestRetrieves pagination specification associated with the item search. If the pagination parameters are present, then items should be retrieved in the page (batch) mode according to that specification. Otherwise, all items should be retrieved.- Specified by:
getPaginationParametersin interfaceItemSearchRequest- Returns:
- an
Optionalcontaining thePaginationParameters, if pagination was specified for this item lookup, or anOptional.empty()otherwise.
-
getTypeDescriptor
Description copied from interface:ItemSearchRequestSpecifies the metadata describing the requested item type.- Specified by:
getTypeDescriptorin interfaceItemSearchRequest- Returns:
- descriptor of an item type within the context integration object, for which data are being requested.
-
getRequestedItem
Description copied from interface:ItemSearchRequestRetrieves integration item that contains key attributes of the item to be found.- Specified by:
getRequestedItemin interfaceItemSearchRequest- Returns:
- a search key represented as an item. If search should be done by an item key, then
IntegrationItemcontaining the key attributes values must be present in this request. However, when search should result in multiple items found, then this method returnsOptional.empty().
-
getFilter
Description copied from interface:ItemSearchRequestSpecifies conditions the items to retrieve should match.- Specified by:
getFilterin interfaceItemSearchRequest- Returns:
- conditions to be used for searching requested items.
-
getOrderBy
Description copied from interface:ItemSearchRequestSpecifies conditions the items to retrieve should be ordered by- Specified by:
getOrderByin interfaceItemSearchRequest- Returns:
- order by expression list
List<OrderExpression>
-
getAcceptLocale
Description copied from interface:ItemSearchRequestGet accepted locale extracted from the "Accept-Language" header locale associated with the request.- Specified by:
getAcceptLocalein interfaceItemSearchRequest- Returns:
- accepted locale
Locale
-
includeTotalCount
public boolean includeTotalCount()Description copied from interface:ItemSearchRequestSpecifies whether total number of items matching this request should be included in the response or not.- Specified by:
includeTotalCountin interfaceItemSearchRequest- Returns:
true, if the search result must include total number of matching items;false, if the search result needs to contain item(s) only and does not need total count. Keep in mind that requesting total count to be included in the search result may incur performance penalty.
-
isCountOnly
public boolean isCountOnly()Description copied from interface:ItemSearchRequestSpecifies whether the search response should include number of matching items only.- Specified by:
isCountOnlyin interfaceItemSearchRequest- Returns:
true, if the search result should contain only count of the matching items but no matching items themselves;false, if the items must be included. Note,trueresult of this call implies thatincludeTotalCount()also returnstrue.
-