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

svn commit: r895906 - in /websites/staging/olingo/trunk/content: ./ doc/tutorials/ExtendingtheEDM.html

Author: buildbot
Date: Fri Jan 31 07:11:11 2014
New Revision: 895906

Log:
Staging update by buildbot for olingo

Modified:
    websites/staging/olingo/trunk/content/   (props changed)
    websites/staging/olingo/trunk/content/doc/tutorials/ExtendingtheEDM.html

Propchange: websites/staging/olingo/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri Jan 31 07:11:11 2014
@@ -1 +1 @@
-1563060
+1563071

Modified: websites/staging/olingo/trunk/content/doc/tutorials/ExtendingtheEDM.html
==============================================================================
--- websites/staging/olingo/trunk/content/doc/tutorials/ExtendingtheEDM.html (original)
+++ websites/staging/olingo/trunk/content/doc/tutorials/ExtendingtheEDM.html Fri Jan 31 07:11:11 2014
@@ -73,7 +73,7 @@
             
             
             <h1 id="extending-the-edm-generated-from-the-jpa-models">Extending the EDM Generated from the JPA Models</h1>
-<p>The Entity Data Model (EDM) generated from the JPA models can be extended with new Entity Types, Complex Types and also the existing EDM elements can be modified by implementing the interface method <strong><em>org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmExtension.extendJPAEdmSchemaP</em></strong>.</p>
+<p>The Entity Data Model (EDM) generated from the JPA models can be extended with new Entity Types, Complex Types and also the existing EDM elements can be modified by implementing the interface method 'org.apache.olingo.odata2.jpa.processor.api.model.JPAEdmExtension.extendJPAEdmSchema'.</p>
 <p>https://git-wip-us.apache.org/repos/asf?p=incubator-olingo-odata2.git;h=ecdc476</p>
 <h4 id="how-to-add-a-complex-type-to-an-edm">How to Add a Complex Type to an EDM</h4>
 <p>Consider a scenario where we have a Plain Old Java Object (POJO) in the OrderValue Java class and let us try to transform this POJO into a Complex Type in the EDM &lt;&gt;. SalesOrderProcessingExtension implements the JPAEdmExtension </p>
@@ -91,6 +91,7 @@ public String getCurrency() </p>
 public void setCurrency(String currency) </p>
 <p>{ this.currency = currency; } </p>
 <p>}</p>
+<p>Here is a possible implementation where the SalesOrderProcessingExtension implements the JPAEdmExtension. </p>
 <h5 id="sample-code">Sample Code</h5>
 <div class="codehilite"><pre>            <span class="p">@</span><span class="n">Override</span>
     <span class="n">public</span> <span class="n">void</span> <span class="n">extendJPAEdmSchema</span><span class="p">(</span><span class="n">final</span> <span class="n">JPAEdmSchemaView</span> <span class="n">view</span><span class="p">)</span> <span class="p">{</span>
@@ -122,6 +123,7 @@ public void setCurrency(String currency)
 </pre></div>
 
 
+<p>You need to set your JPAEDMExtension type in the initializeODataJPAContext of JPAReferenceServiceFactory.</p>
 <p>The Complex Type added to the EDM can be used as Function Imports Return Type. See &lt;&gt; for more information.</p>