Class ItemLookupRequest
- java.lang.Object
-
- de.hybris.platform.odata2services.odata.persistence.AbstractRequest
-
- de.hybris.platform.odata2services.odata.persistence.CrudRequest
-
- de.hybris.platform.odata2services.odata.persistence.ItemLookupRequest
-
- All Implemented Interfaces:
ItemSearchRequest
public class ItemLookupRequest extends CrudRequest implements ItemSearchRequest
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.odata2services.odata.persistence.CrudRequest
CrudRequest.DataRequestBuilder<T extends CrudRequest.DataRequestBuilder,R extends CrudRequest>
-
Nested classes/interfaces inherited from class de.hybris.platform.odata2services.odata.persistence.AbstractRequest
AbstractRequest.AbstractRequestBuilder<T extends AbstractRequest.AbstractRequestBuilder,R extends AbstractRequest>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.LocalegetAcceptLocale()Retrieves data acceptLocale associated with the request.org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String>getAttribute()Deprecated, for removal: This API element is subject to removal in a future version.since 1905.2002-CEP attribute conditions are converted to filter conditions and therefore can be retrieved bygetFilter()call.java.util.List<java.util.ArrayList<org.apache.olingo.odata2.api.uri.NavigationPropertySegment>>getExpand()WhereClauseConditionsgetFilter()Specifies conditions the items to retrieve should match.IntegrationItemgetIntegrationItem()java.util.List<org.apache.olingo.odata2.api.uri.NavigationSegment>getNavigationSegments()java.util.List<OrderExpression>getOrderBy()Specifies conditions the items to retrieve should be ordered byjava.util.Optional<PaginationParameters>getPaginationParameters()Retrieves pagination specification associated with the item search.java.util.Optional<IntegrationItem>getRequestedItem()Retrieves integration item that contains key attributes of the item to be found.java.lang.IntegergetSkip()Deprecated, for removal: This API element is subject to removal in a future version.use {@link #getPaginationParameters().getPageSize()} method instead.java.lang.IntegergetTop()Deprecated, for removal: This API element is subject to removal in a future version.use {@link #getPaginationParameters().getPageStart()} method instead.@NotNull TypeDescriptorgetTypeDescriptor()Specifies the metadata describing the requested item type.booleanincludeTotalCount()Specifies whether total number of items matching this request should be included in the response or not.booleanisCount()Deprecated, for removal: This API element is subject to removal in a future version.useincludeTotalCount()method insteadbooleanisCountOnly()Specifies whether the search response should include number of matching items only.booleanisNoFilterResult()ItemConversionRequesttoConversionRequest(ItemModel item)Builds a conversion request with default conversion options from this item lookup requestItemConversionRequesttoConversionRequest(ItemModel item, ConversionOptions options)Builds a conversion request from this item lookup request-
Methods inherited from class de.hybris.platform.odata2services.odata.persistence.CrudRequest
getContentType, getIntegrationKey, getODataEntry, getRequestUri, getServiceRoot, setContentType, setIntegrationItem, setIntegrationKey, setODataEntry, setRequestUri, setServiceRoot
-
Methods inherited from class de.hybris.platform.odata2services.odata.persistence.AbstractRequest
getEntitySet, getEntitySetReferencedByProperty, getEntityType, getIntegrationObjectCode, getPropertyTypeName, setAcceptLocale, setEntitySet, setEntityType, setIntegrationObjectCode
-
-
-
-
Method Detail
-
getIntegrationItem
public IntegrationItem getIntegrationItem()
- Overrides:
getIntegrationItemin classCrudRequest
-
getSkip
@Deprecated(since="2105", forRemoval=true) public java.lang.Integer getSkip()Deprecated, for removal: This API element is subject to removal in a future version.use {@link #getPaginationParameters().getPageSize()} method instead.Retrieves number of items to be skipped in the result set.- Returns:
- requested items will be read from the persistent storage, then, if offset is greater than
0, theoffsetnumber of items at the beginning of the result set will be removed.
-
getTop
@Deprecated(since="2105", forRemoval=true) public java.lang.Integer getTop()Deprecated, for removal: This API element is subject to removal in a future version.use {@link #getPaginationParameters().getPageStart()} method instead.Retrieves number of items to return in the search result.- Returns:
- number of items to be retrieved. The search result may contain fewer number of items or maybe even not items, but it should not contain more items then the page size specified.
-
getNavigationSegments
public java.util.List<org.apache.olingo.odata2.api.uri.NavigationSegment> getNavigationSegments()
-
getPaginationParameters
public java.util.Optional<PaginationParameters> 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
@NotNull public @NotNull TypeDescriptor 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
public java.util.Optional<IntegrationItem> 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().
-
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.
-
getFilter
public WhereClauseConditions 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
public java.util.List<OrderExpression> 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>
-
getAttribute
@Deprecated(since="1905.2002-CEP", forRemoval=true) public org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String> getAttribute()Deprecated, for removal: This API element is subject to removal in a future version.since 1905.2002-CEP attribute conditions are converted to filter conditions and therefore can be retrieved bygetFilter()call.
-
isNoFilterResult
public boolean isNoFilterResult()
-
isCount
@Deprecated(since="1905.01-CEP", forRemoval=true) public boolean isCount()Deprecated, for removal: This API element is subject to removal in a future version.useincludeTotalCount()method insteadDetermines whether total number of items matching this request should be included in the response or not.- Returns:
true, if the response must include the total number of matching items;false, if the response needs to contain item(s) only and does not need total count.
-
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.
-
getExpand
public java.util.List<java.util.ArrayList<org.apache.olingo.odata2.api.uri.NavigationPropertySegment>> getExpand()
-
getAcceptLocale
public java.util.Locale getAcceptLocale()
Retrieves data acceptLocale associated with the request.- Specified by:
getAcceptLocalein interfaceItemSearchRequest- Overrides:
getAcceptLocalein classAbstractRequest- Returns:
- a "Accept-Language" header locale associated with the request.
-
toConversionRequest
public ItemConversionRequest toConversionRequest(ItemModel item) throws org.apache.olingo.odata2.api.edm.EdmException
Builds a conversion request with default conversion options from this item lookup request- Parameters:
item- an item to be converted to an ODataEntry- Returns:
- an item conversion request built from this item lookup request
- Throws:
org.apache.olingo.odata2.api.edm.EdmException- if underlying EDM is invalid. This is not likely because in such case this request could not be built at the first place
-
toConversionRequest
public ItemConversionRequest toConversionRequest(ItemModel item, ConversionOptions options) throws org.apache.olingo.odata2.api.edm.EdmException
Builds a conversion request from this item lookup request- Parameters:
item- an item to be converted to an ODataEntryoptions- conversion options to apply- Returns:
- an item conversion request built from this item lookup request
- Throws:
org.apache.olingo.odata2.api.edm.EdmException- if underlying EDM is invalid. This is not likely because in such case this request could not be built at the first place
-
-