You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by de...@apache.org on 2014/07/01 08:43:49 UTC

svn commit: r1606992 - /olingo/site/trunk/content/doc/tutorials/CustomODataJPAProcessor.mdtext

Author: deepa
Date: Tue Jul  1 06:43:49 2014
New Revision: 1606992

URL: http://svn.apache.org/r1606992
Log:
CMS commit to olingo by deepa

Modified:
    olingo/site/trunk/content/doc/tutorials/CustomODataJPAProcessor.mdtext

Modified: olingo/site/trunk/content/doc/tutorials/CustomODataJPAProcessor.mdtext
URL: http://svn.apache.org/viewvc/olingo/site/trunk/content/doc/tutorials/CustomODataJPAProcessor.mdtext?rev=1606992&r1=1606991&r2=1606992&view=diff
==============================================================================
--- olingo/site/trunk/content/doc/tutorials/CustomODataJPAProcessor.mdtext (original)
+++ olingo/site/trunk/content/doc/tutorials/CustomODataJPAProcessor.mdtext Tue Jul  1 06:43:49 2014
@@ -22,7 +22,7 @@ OData JPA Processor Library along with t
 
 Custom OData JPA Processor is supported from Apache Olingo release 1.1.0 onwards.
 
-1. Write a Custom OData JPA Processor by extending the class `org.apache.olingo.odata2.jpa.processor.api.ODataJPAProcessor`. In the code snippet below, pre-process and post-process are two private methods that can be written to process the request and response. The instance variable (part of ODataJPAProcessor) `jpaProcessor` can be used to process the OData request. The `jpaProcessor` returns the JPA entities after processing the OData request. The instance variable `responseBuilder` can be used for building the OData response from the processed JPA entities.
+a. Write a Custom OData JPA Processor by extending the class `org.apache.olingo.odata2.jpa.processor.api.ODataJPAProcessor`. In the code snippet below, pre-process and post-process are two private methods that can be written to process the request and response. The instance variable (part of ODataJPAProcessor) `jpaProcessor` can be used to process the OData request. The `jpaProcessor` returns the JPA entities after processing the OData request. The instance variable `responseBuilder` can be used for building the OData response from the processed JPA entities.
 
 		public class CustomODataJPAProcessor extends ODataJPAProcessor{
     
@@ -45,10 +45,11 @@ Custom OData JPA Processor is supported 
           }
 
          }
-2. Write a Custom OData JPA Service Factory 
+b. Write a Custom OData JPA Service Factory 
 Implement an OData JPA service factory to create an OData service with custom OData JPA Processor. The default service factory `org.apache.olingo.odata2.jpa.processor.api.ODataJPAServiceFactory` part of the library cannot be used. Hence, create a class by extending `org.apache.olingo.odata2.api.ODataServiceFactory`. Follow the steps below to hook an existing flow to a custom OData JPA Processor. Copy the entire code from `ODataJPAServiceFactory` and replace the code as shown below. 
 
-		 ODataSingleProcessor odataJPAProcessor = accessFactory.createODataProcessor(oDataJPAContext);
+
+		  ODataSingleProcessor odataJPAProcessor = accessFactory.createODataProcessor(oDataJPAContext);
 
     with