Class DefaultItemLookupRequestFactory
java.lang.Object
de.hybris.platform.odata2services.odata.persistence.DefaultItemLookupRequestFactory
- All Implemented Interfaces:
ItemLookupRequestFactory
Default implementation of the
ItemLookupRequestFactory-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.odata2services.odata.persistence.ItemLookupRequestBuilderbuildWithFilter(de.hybris.platform.odata2services.odata.persistence.ItemLookupRequestBuilder builder, org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context) 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) Creates anItemLookupRequestthat can be used to filter items matching the integration keycreate(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context) Creates anItemLookupRequestfrom the given parameterscreate(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context, String contentType) Creates anItemLookupRequestfrom the given parametersprotected org.apache.olingo.odata2.api.uri.expression.ExpressionVisitorcreateExpressionVisitor(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context) createFrom(ItemLookupRequest request, org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry oDataEntry) Creates anItemLookupRequestfrom the given parameters@NotNull ItemLookupRequestcreateWithFilter(org.apache.olingo.odata2.api.processor.ODataContext context, org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, WhereClauseConditions filter) Creates anItemLookupRequestthat can be used to filter items matching a given attribute, e.g.protected IntegerderiveSkip(org.apache.olingo.odata2.api.uri.UriInfo uriInfo) protected Integerprotected ODataEntryToIntegrationItemConverterprotected ExpressionVisitorFactoryprotected IntegrationKeyToODataEntryGeneratorprotected ODataContextLanguageExtractorprotected ODataServicesConfigurationprotected ServiceNameExtractorprotected StringgetServiceNameFromContext(org.apache.olingo.odata2.api.processor.ODataContext context) protected voidhandleFilter(de.hybris.platform.odata2services.odata.persistence.ItemLookupRequestBuilder builder, org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context) protected voidhandleOrderBy(de.hybris.platform.odata2services.odata.persistence.ItemLookupRequestBuilder builder, org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context) protected static booleanhasKey(org.apache.olingo.odata2.api.uri.UriInfo uriInfo) voidvoidsetExpressionVisitorFactory(ExpressionVisitorFactory expressionVisitorFactory) voidsetIntegrationKeyToODataEntryGenerator(IntegrationKeyToODataEntryGenerator integrationKeyToODataEntryGenerator) voidvoidsetLocaleExtractor(ODataContextLanguageExtractor localeExtractor) voidsetODataServicesConfiguration(ODataServicesConfiguration oDataServicesConfiguration) voidsetServiceNameExtractor(ServiceNameExtractor serviceNameExtractor)
-
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:ItemLookupRequestFactoryCreates anItemLookupRequestfrom the given parameters- Specified by:
createin interfaceItemLookupRequestFactory- Parameters:
uriInfo- Used to create the ItemLookupRequestcontext- Used to create the ItemLookupRequestcontentType- 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:ItemLookupRequestFactoryCreates anItemLookupRequestthat can be used to filter items matching the integration key- Specified by:
createin interfaceItemLookupRequestFactory- Parameters:
context- Used to create the ItemLookupRequestedmEntitySet- Used to create the ItemLookupRequestoDataEntry- Used to create the ItemLookupRequestintegrationKey- 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:ItemLookupRequestFactoryCreates anItemLookupRequestthat can be used to filter items matching a given attribute, e.g.version = 'Staged'- Specified by:
createWithFilterin interfaceItemLookupRequestFactory- Parameters:
context- HTTP request context that carries URL parameters, etcentitySet- requested entity setfilter- a filter based on the attribute values to be added to the produced request. These conditions replace conditions possibly existing in thecontext.- 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:ItemLookupRequestFactoryCreates anItemLookupRequestfrom the given parameters- Specified by:
createin interfaceItemLookupRequestFactory- Parameters:
uriInfo- Used to create the ItemLookupRequestcontext- 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:ItemLookupRequestFactoryCreates anItemLookupRequestfrom the given parameters- Specified by:
createFromin interfaceItemLookupRequestFactory- Parameters:
request- base request to create new request fromentitySet- entity set of the new lookup requestoDataEntry- 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.ExceptionVisitExpressionorg.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.ExceptionVisitExpressionorg.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.ExceptionVisitExpressionorg.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
-
deriveTop
-
getServiceNameFromContext
protected String getServiceNameFromContext(org.apache.olingo.odata2.api.processor.ODataContext context) -
getODataServicesConfiguration
-
getIntegrationKeyToODataEntryGenerator
-
setIntegrationKeyToODataEntryGenerator
public void setIntegrationKeyToODataEntryGenerator(IntegrationKeyToODataEntryGenerator integrationKeyToODataEntryGenerator) -
getLocaleExtractor
-
setLocaleExtractor
-
getServiceNameExtractor
-
setServiceNameExtractor
-
setODataServicesConfiguration
-
getExpressionVisitorFactory
-
setExpressionVisitorFactory
-
getEntryConverter
-
setEntryConverter
-
setItemTypeDescriptorService
-