Class DefaultItemLookupRequestFactory

java.lang.Object
de.hybris.platform.odata2services.odata.persistence.DefaultItemLookupRequestFactory
All Implemented Interfaces:
ItemLookupRequestFactory

public class DefaultItemLookupRequestFactory extends Object implements ItemLookupRequestFactory
Default implementation of the ItemLookupRequestFactory
  • Constructor Details

    • DefaultItemLookupRequestFactory

      public DefaultItemLookupRequestFactory()
  • Method Details

    • create

      public ItemLookupRequest create(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context, String contentType)
      Description copied from interface: ItemLookupRequestFactory
      Creates an ItemLookupRequest from the given parameters
      Specified by:
      create in interface ItemLookupRequestFactory
      Parameters:
      uriInfo - Used to create the ItemLookupRequest
      context - Used to create the ItemLookupRequest
      contentType - Used to create the ItemLookupRequest
      Returns:
      ItemLookupRequest instance
    • create

      public ItemLookupRequest create(org.apache.olingo.odata2.api.processor.ODataContext context, org.apache.olingo.odata2.api.edm.EdmEntitySet edmEntitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry oDataEntry, String integrationKey) throws org.apache.olingo.odata2.api.edm.EdmException
      Description copied from interface: ItemLookupRequestFactory
      Creates an ItemLookupRequest that can be used to filter items matching the integration key
      Specified by:
      create in interface ItemLookupRequestFactory
      Parameters:
      context - Used to create the ItemLookupRequest
      edmEntitySet - Used to create the ItemLookupRequest
      oDataEntry - Used to create the ItemLookupRequest
      integrationKey - Used to create the ItemLookupRequest
      Returns:
      ItemLookupRequest instance
      Throws:
      org.apache.olingo.odata2.api.edm.EdmException - if OData problem
    • createWithFilter

      @NotNull public @NotNull ItemLookupRequest createWithFilter(org.apache.olingo.odata2.api.processor.ODataContext context, org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, WhereClauseConditions filter) throws org.apache.olingo.odata2.api.edm.EdmException
      Description copied from interface: ItemLookupRequestFactory
      Creates an ItemLookupRequest that can be used to filter items matching a given attribute, e.g. version = 'Staged'
      Specified by:
      createWithFilter in interface ItemLookupRequestFactory
      Parameters:
      context - HTTP request context that carries URL parameters, etc
      entitySet - requested entity set
      filter - a filter based on the attribute values to be added to the produced request. These conditions replace conditions possibly existing in the context.
      Returns:
      ItemLookupRequest instance new request instance
      Throws:
      org.apache.olingo.odata2.api.edm.EdmException - if OData problem
    • create

      public ItemLookupRequest create(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context)
      Description copied from interface: ItemLookupRequestFactory
      Creates an ItemLookupRequest from the given parameters
      Specified by:
      create in interface ItemLookupRequestFactory
      Parameters:
      uriInfo - Used to create the ItemLookupRequest
      context - Used to create the ItemLookupRequest
      Returns:
      ItemLookupRequest instance
    • createFrom

      public ItemLookupRequest createFrom(ItemLookupRequest request, org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry oDataEntry) throws org.apache.olingo.odata2.api.edm.EdmException
      Description copied from interface: ItemLookupRequestFactory
      Creates an ItemLookupRequest from the given parameters
      Specified by:
      createFrom in interface ItemLookupRequestFactory
      Parameters:
      request - base request to create new request from
      entitySet - entity set of the new lookup request
      oDataEntry - the new ODataEntry for the lookup request
      Returns:
      ItemLookupRequest instance
      Throws:
      org.apache.olingo.odata2.api.edm.EdmException - if OData problem
    • buildWithFilter

      protected de.hybris.platform.odata2services.odata.persistence.ItemLookupRequestBuilder buildWithFilter(de.hybris.platform.odata2services.odata.persistence.ItemLookupRequestBuilder builder, org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context) throws org.apache.olingo.odata2.api.uri.expression.ExceptionVisitExpression, org.apache.olingo.odata2.api.exception.ODataApplicationException
      Throws:
      org.apache.olingo.odata2.api.uri.expression.ExceptionVisitExpression
      org.apache.olingo.odata2.api.exception.ODataApplicationException
    • handleFilter

      protected void handleFilter(de.hybris.platform.odata2services.odata.persistence.ItemLookupRequestBuilder builder, org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context) throws org.apache.olingo.odata2.api.uri.expression.ExceptionVisitExpression, org.apache.olingo.odata2.api.exception.ODataApplicationException
      Throws:
      org.apache.olingo.odata2.api.uri.expression.ExceptionVisitExpression
      org.apache.olingo.odata2.api.exception.ODataApplicationException
    • handleOrderBy

      protected void handleOrderBy(de.hybris.platform.odata2services.odata.persistence.ItemLookupRequestBuilder builder, org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context) throws org.apache.olingo.odata2.api.uri.expression.ExceptionVisitExpression, org.apache.olingo.odata2.api.exception.ODataApplicationException
      Throws:
      org.apache.olingo.odata2.api.uri.expression.ExceptionVisitExpression
      org.apache.olingo.odata2.api.exception.ODataApplicationException
    • createExpressionVisitor

      protected org.apache.olingo.odata2.api.uri.expression.ExpressionVisitor createExpressionVisitor(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context)
    • hasKey

      protected static boolean hasKey(org.apache.olingo.odata2.api.uri.UriInfo uriInfo)
    • deriveSkip

      protected Integer deriveSkip(org.apache.olingo.odata2.api.uri.UriInfo uriInfo)
    • deriveTop

      protected Integer deriveTop(Integer uriInfoTop)
    • getServiceNameFromContext

      protected String getServiceNameFromContext(org.apache.olingo.odata2.api.processor.ODataContext context)
    • getODataServicesConfiguration

      protected ODataServicesConfiguration getODataServicesConfiguration()
    • getIntegrationKeyToODataEntryGenerator

      protected IntegrationKeyToODataEntryGenerator getIntegrationKeyToODataEntryGenerator()
    • setIntegrationKeyToODataEntryGenerator

      public void setIntegrationKeyToODataEntryGenerator(IntegrationKeyToODataEntryGenerator integrationKeyToODataEntryGenerator)
    • getLocaleExtractor

      protected ODataContextLanguageExtractor getLocaleExtractor()
    • setLocaleExtractor

      public void setLocaleExtractor(ODataContextLanguageExtractor localeExtractor)
    • getServiceNameExtractor

      protected ServiceNameExtractor getServiceNameExtractor()
    • setServiceNameExtractor

      public void setServiceNameExtractor(ServiceNameExtractor serviceNameExtractor)
    • setODataServicesConfiguration

      public void setODataServicesConfiguration(ODataServicesConfiguration oDataServicesConfiguration)
    • getExpressionVisitorFactory

      protected ExpressionVisitorFactory getExpressionVisitorFactory()
    • setExpressionVisitorFactory

      public void setExpressionVisitorFactory(ExpressionVisitorFactory expressionVisitorFactory)
    • getEntryConverter

      protected ODataEntryToIntegrationItemConverter getEntryConverter()
    • setEntryConverter

      public void setEntryConverter(ODataEntryToIntegrationItemConverter converter)
    • setItemTypeDescriptorService

      public void setItemTypeDescriptorService(ItemTypeDescriptorService service)