Class DefaultStorageRequestFactory
- java.lang.Object
-
- de.hybris.platform.odata2services.odata.persistence.DefaultStorageRequestFactory
-
- All Implemented Interfaces:
StorageRequestFactory
public class DefaultStorageRequestFactory extends java.lang.Object implements StorageRequestFactory
-
-
Constructor Summary
Constructors Constructor Description DefaultStorageRequestFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IntegrationItemconvert(org.apache.olingo.odata2.api.processor.ODataContext context, org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry)StorageRequestcreate(org.apache.olingo.odata2.api.processor.ODataContext oDataContext, java.lang.String responseContentType, org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry)Get the StorageRequest for persistence processingprotected ODataEntryToIntegrationItemConvertergetEntryConverter()protected ODataContextLanguageExtractorgetLocaleExtractor()protected booleanisItemCanBeCreated(org.apache.olingo.odata2.api.processor.ODataContext context)Determines whether the request insists on updating an existing item only or allows new item creation.protected booleanisReplaceAttributes(org.apache.olingo.odata2.api.processor.ODataContext oDataContext)Determines if the request is to replace the attributes provided in the payloadvoidsetEntryConverter(ODataEntryToIntegrationItemConverter converter)voidsetLocaleExtractor(ODataContextLanguageExtractor localeExtractor)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.odata2services.odata.persistence.StorageRequestFactory
create
-
-
-
-
Method Detail
-
create
public StorageRequest create(org.apache.olingo.odata2.api.processor.ODataContext oDataContext, java.lang.String responseContentType, org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry)
Description copied from interface:StorageRequestFactoryGet the StorageRequest for persistence processing- Specified by:
createin interfaceStorageRequestFactory- Parameters:
oDataContext- The ODataContext to be used.responseContentType- contentType to use.entitySet- EdmEntitySet to use.entry- ODataEntry to use.- Returns:
- The StorageRequest used for persistence
-
isReplaceAttributes
protected boolean isReplaceAttributes(org.apache.olingo.odata2.api.processor.ODataContext oDataContext)
Determines if the request is to replace the attributes provided in the payload- Parameters:
oDataContext- Context used in making the decision- Returns:
true, replace attributes, otherwisefalse
-
isItemCanBeCreated
protected boolean isItemCanBeCreated(org.apache.olingo.odata2.api.processor.ODataContext context)
Determines whether the request insists on updating an existing item only or allows new item creation.- Parameters:
context- context used in making the decision- Returns:
true, if the item can be created when it does not exist in the system;false, when new item cannot be created and only an existing item should be updated.
-
convert
protected IntegrationItem convert(org.apache.olingo.odata2.api.processor.ODataContext context, org.apache.olingo.odata2.api.edm.EdmEntitySet entitySet, org.apache.olingo.odata2.api.ep.entry.ODataEntry entry) throws org.apache.olingo.odata2.api.edm.EdmException
- Throws:
org.apache.olingo.odata2.api.edm.EdmException
-
getLocaleExtractor
protected ODataContextLanguageExtractor getLocaleExtractor()
-
setLocaleExtractor
public void setLocaleExtractor(ODataContextLanguageExtractor localeExtractor)
-
getEntryConverter
protected ODataEntryToIntegrationItemConverter getEntryConverter()
-
setEntryConverter
public void setEntryConverter(ODataEntryToIntegrationItemConverter converter)
-
-