Class DefaultItemLookupRequestFactory
- java.lang.Object
-
- de.hybris.platform.odata2services.odata.persistence.DefaultItemLookupRequestFactory
-
- All Implemented Interfaces:
ItemLookupRequestFactory
public class DefaultItemLookupRequestFactory extends java.lang.Object implements ItemLookupRequestFactory
Default implementation of theItemLookupRequestFactory
-
-
Constructor Summary
Constructors Constructor Description DefaultItemLookupRequestFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected de.hybris.platform.odata2services.odata.persistence.ItemLookupRequest.ItemLookupRequestBuilderbuildWithFilter(de.hybris.platform.odata2services.odata.persistence.ItemLookupRequest.ItemLookupRequestBuilder builder, org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context)ItemLookupRequestcreate(org.apache.olingo.odata2.api.processor.ODataContext context, org.apache.olingo.odata2.api.edm.EdmEntitySet edmEntitySet, org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String> attribute)Creates anItemLookupRequestthat can be used to filter items matching the given attribute (e.g.ItemLookupRequestcreate(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, java.lang.String integrationKey)Creates anItemLookupRequestthat can be used to filter items matching the integration keyItemLookupRequestcreate(org.apache.olingo.odata2.api.uri.info.DeleteUriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context)Creates anItemLookupRequestfrom the given parametersItemLookupRequestcreate(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context, java.lang.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)ItemLookupRequestcreateFrom(ItemLookupRequest request, org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry oDataEntry)Creates anItemLookupRequestfrom the given parametersprotected java.lang.IntegerderiveSkip(org.apache.olingo.odata2.api.uri.UriInfo uriInfo)protected java.lang.IntegerderiveTop(java.lang.Integer uriInfoTop)protected ODataEntryToIntegrationItemConvertergetEntryConverter()protected ExpressionVisitorFactorygetExpressionVisitorFactory()protected java.lang.StringgetIntegrationKey(org.apache.olingo.odata2.api.edm.EdmEntitySet edmEntitySet, java.util.List<org.apache.olingo.odata2.api.uri.KeyPredicate> keyPredicates)protected IntegrationKeyToODataEntryGeneratorgetIntegrationKeyToODataEntryGenerator()protected ODataContextLanguageExtractorgetLocaleExtractor()protected ODataServicesConfigurationgetODataServicesConfiguration()protected ServiceNameExtractorgetServiceNameExtractor()protected java.lang.StringgetServiceNameFromContext(org.apache.olingo.odata2.api.processor.ODataContext context)protected static booleanhasKey(org.apache.olingo.odata2.api.uri.UriInfo uriInfo)voidsetEntryConverter(ODataEntryToIntegrationItemConverter converter)voidsetExpressionVisitorFactory(ExpressionVisitorFactory expressionVisitorFactory)voidsetIntegrationKeyToODataEntryGenerator(IntegrationKeyToODataEntryGenerator integrationKeyToODataEntryGenerator)voidsetLocaleExtractor(ODataContextLanguageExtractor localeExtractor)voidsetODataServicesConfiguration(ODataServicesConfiguration oDataServicesConfiguration)voidsetServiceNameExtractor(ServiceNameExtractor serviceNameExtractor)
-
-
-
Method Detail
-
create
public ItemLookupRequest create(org.apache.olingo.odata2.api.uri.UriInfo uriInfo, org.apache.olingo.odata2.api.processor.ODataContext context, java.lang.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, java.lang.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
-
create
public ItemLookupRequest create(org.apache.olingo.odata2.api.processor.ODataContext context, org.apache.olingo.odata2.api.edm.EdmEntitySet edmEntitySet, org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String> attribute) throws org.apache.olingo.odata2.api.edm.EdmException
Description copied from interface:ItemLookupRequestFactoryCreates anItemLookupRequestthat can be used to filter items matching the given attribute (e.g. version = 'Staged')- Specified by:
createin interfaceItemLookupRequestFactory- Parameters:
context- Used to create the ItemLookupRequestedmEntitySet- Used to create the ItemLookupRequestattribute- Used to create the ItemLookupRequest- Returns:
- ItemLookupRequest 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.ItemLookupRequest.ItemLookupRequestBuilder buildWithFilter(de.hybris.platform.odata2services.odata.persistence.ItemLookupRequest.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
protected java.lang.Integer deriveSkip(org.apache.olingo.odata2.api.uri.UriInfo uriInfo)
-
deriveTop
protected java.lang.Integer deriveTop(java.lang.Integer uriInfoTop)
-
getServiceNameFromContext
protected java.lang.String getServiceNameFromContext(org.apache.olingo.odata2.api.processor.ODataContext context)
-
getIntegrationKey
protected java.lang.String getIntegrationKey(org.apache.olingo.odata2.api.edm.EdmEntitySet edmEntitySet, java.util.List<org.apache.olingo.odata2.api.uri.KeyPredicate> keyPredicates) throws org.apache.olingo.odata2.api.edm.EdmException- Throws:
org.apache.olingo.odata2.api.edm.EdmException
-
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)
-
-