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 2015/11/17 17:39:06 UTC

svn commit: r972735 - in /websites/staging/olingo/trunk/content: ./ doc/odata4/tutorials/deep_insert/tutorial_deep_insert.html

Author: buildbot
Date: Tue Nov 17 16:39:06 2015
New Revision: 972735

Log:
Staging update by buildbot for olingo

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

Propchange: websites/staging/olingo/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Nov 17 16:39:06 2015
@@ -1 +1 @@
-1714826
+1714831

Modified: websites/staging/olingo/trunk/content/doc/odata4/tutorials/deep_insert/tutorial_deep_insert.html
==============================================================================
--- websites/staging/olingo/trunk/content/doc/odata4/tutorials/deep_insert/tutorial_deep_insert.html (original)
+++ websites/staging/olingo/trunk/content/doc/odata4/tutorials/deep_insert/tutorial_deep_insert.html Tue Nov 17 16:39:06 2015
@@ -155,7 +155,10 @@ Please have a look at the figure below.
 <img alt="Deserializer Result" src="before.png" /></p>
 <p>When our implementation has processed the whole request, all entites are created and linked as <strong>navigationLinks</strong>.</p>
 <p><img alt="After Deep insert" src="after.png" /></p>
-<p>In the previous tutorials the entity object returned by the deserializer is passed to the data store. Please open the class <code>myservice.mynamespace.data.Storage</code> and jump the method <code>createEntity</code>.</p>
+<p>If one of the requests fail, or one of the binding links is invalid, none of the entities must be created. 
+The prepared implementation provides the methods <code>beginTransaction</code>, <code>rollbackTransaction</code> and <code>commitTransaction</code> in the data store to simulate a transactional behavior.
+Those methods are called in the <code>DemoEntityProcessor</code> implementation. So if you throw an exception in the createEntity Method the transaction will automatically rolled back.</p>
+<p>So let us begin with the implementation. In the previous tutorials the entity object returned by the deserializer is passed to the data store. Please open the class <code>myservice.mynamespace.data.Storage</code> and jump the method <code>createEntity</code>.</p>
 <p>The implementation should look like the following:</p>
 <div class="codehilite"><pre><span class="kd">private</span> <span class="n">Entity</span> <span class="nf">createEntity</span><span class="o">(</span><span class="n">EdmEntitySet</span> <span class="n">edmEntitySet</span><span class="o">,</span> <span class="n">EdmEntityType</span> <span class="n">edmEntityType</span><span class="o">,</span> <span class="n">Entity</span> <span class="n">entity</span><span class="o">,</span> 
     <span class="n">List</span><span class="o">&lt;</span><span class="n">Entity</span><span class="o">&gt;</span> <span class="n">entityList</span><span class="o">,</span> <span class="kd">final</span> <span class="n">String</span> <span class="n">rawServiceUri</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">ODataApplicationException</span> <span class="o">{</span>