Class ChangeSetPersistenceHandler
java.lang.Object
de.hybris.platform.odata2services.odata.processor.handler.persistence.batch.ChangeSetPersistenceHandler
- All Implemented Interfaces:
ODataProcessorHandler<ChangeSetParam,org.apache.olingo.odata2.api.batch.BatchResponsePart>
public class ChangeSetPersistenceHandler
extends Object
implements ODataProcessorHandler<ChangeSetParam,org.apache.olingo.odata2.api.batch.BatchResponsePart>
ODataProcessor handler that persists a change set request
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidMarks the beginning of the transactionprotected voidCommits the changes in the transactionprotected org.apache.olingo.odata2.api.batch.BatchResponsePartcreateBatchResponsePart(List<org.apache.olingo.odata2.api.processor.ODataResponse> responses) Creates aBatchResponsePartfrom the persistence responsesprotected voidendTransaction(List<org.apache.olingo.odata2.api.processor.ODataResponse> responses) Marks the end of the transactionprotected Transactionprotected ModelServiceorg.apache.olingo.odata2.api.batch.BatchResponseParthandle(ChangeSetParam param) protected List<org.apache.olingo.odata2.api.processor.ODataResponse>Handle the requests in a transactionprotected voidRolls back the changes in the transactionvoidsetModelService(ModelService modelService)
-
Constructor Details
-
ChangeSetPersistenceHandler
public ChangeSetPersistenceHandler()
-
-
Method Details
-
handle
- Specified by:
handlein interfaceODataProcessorHandler<ChangeSetParam,org.apache.olingo.odata2.api.batch.BatchResponsePart>
-
getCurrentTransaction
-
handleRequestsInTransaction
protected List<org.apache.olingo.odata2.api.processor.ODataResponse> handleRequestsInTransaction(ChangeSetParam param) Handle the requests in a transaction- Parameters:
param- Parameters from the request- Returns:
- List of
ODataResponses
-
commitTransaction
protected void commitTransaction()Commits the changes in the transaction -
rollbackTransaction
protected void rollbackTransaction()Rolls back the changes in the transaction -
beginTransaction
protected void beginTransaction()Marks the beginning of the transaction -
endTransaction
Marks the end of the transaction- Parameters:
responses- The responses from the persistence
-
createBatchResponsePart
protected org.apache.olingo.odata2.api.batch.BatchResponsePart createBatchResponsePart(List<org.apache.olingo.odata2.api.processor.ODataResponse> responses) Creates aBatchResponsePartfrom the persistence responses- Parameters:
responses- List of persistence responses- Returns:
- The BatchResponsePart
-
getModelService
-
setModelService
-