Author: buildbot
Date: Wed Aug  8 13:17:34 2012
New Revision: 828382

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/mongodb.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/mongodb.html
==============================================================================
--- websites/production/camel/content/mongodb.html (original)
+++ websites/production/camel/content/mongodb.html Wed Aug  8 13:17:34 2012
@@ -138,11 +138,24 @@ from(<span class="code-quote">"direct:fi
 
 <h4><a shape="rect" name="MongoDB-findOneByQuery"></a>findOneByQuery</h4>
 
-<p>Use this operation to retrieve just one element from the collection that 
matches a MongoDB query. The query object is extracted from the IN message 
body, i.e. it should be of type <tt>DBObject</tt> or convertible to 
<tt>DBObject</tt>. See <span class="error">[Type conversions]</span>.</p>
+<p>Use this operation to retrieve just one element from the collection that 
matches a MongoDB query. <b>The query object is extracted from the IN message 
body</b>, i.e. it should be of type <tt>DBObject</tt> or convertible to 
<tt>DBObject</tt>. It can be a JSON String or a Hashmap. See <a shape="rect" 
href="#MongoDB-Typeconversions">Type conversions</a> for more info.</p>
+
+<p>Example with no query (returns any object of the collection):</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<pre class="code-java">
+from(<span class="code-quote">"direct:findOneByQuery"</span>)
+    .to(<span 
class="code-quote">"mongodb:myDb?database=flights&amp;collection=tickets&amp;operation&amp;operation=findOneByQuery"</span>)
+    .to(<span class="code-quote">"mock:resultFindOneByQuery"</span>);
+</pre>
+</div></div>
+
+<p>Example with a query (returns one matching result):</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
 <pre class="code-java">
 from(<span class="code-quote">"direct:findOneByQuery"</span>)
+    .setBody().constant(<span class="code-quote">"{ \"</span>name\<span 
class="code-quote">": \"</span>Raul Kripalani\<span class="code-quote">" 
}"</span>)
     .to(<span 
class="code-quote">"mongodb:myDb?database=flights&amp;collection=tickets&amp;operation&amp;operation=findOneByQuery"</span>)
     .to(<span class="code-quote">"mock:resultFindOneByQuery"</span>);
 </pre>
@@ -152,11 +165,24 @@ from(<span class="code-quote">"direct:fi
 
 <h4><a shape="rect" name="MongoDB-findAll"></a>findAll</h4>
 
-<p>The <tt>findAll</tt> operation returns all documents matching a query, or 
none at all, in which case all documents contained in the collection are 
returned.</p>
+<p>The <tt>findAll</tt> operation returns all documents matching a query, or 
none at all, in which case all documents contained in the collection are 
returned. <b>The query object is extracted from the IN message body</b>, i.e. 
it should be of type <tt>DBObject</tt> or convertible to <tt>DBObject</tt>. It 
can be a JSON String or a Hashmap. See <a shape="rect" 
href="#MongoDB-Typeconversions">Type conversions</a> for more info.</p>
+
+<p>Example with no query (returns all object in the collection):</p>
+
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<pre class="code-java">
+from(<span class="code-quote">"direct:findAll"</span>)
+    .to(<span 
class="code-quote">"mongodb:myDb?database=flights&amp;collection=tickets&amp;operation=findAll"</span>)
+    .to(<span class="code-quote">"mock:resultFindAll"</span>);
+</pre>
+</div></div>
+
+<p>Example with a query (returns all matching results):</p>
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
 <pre class="code-java">
 from(<span class="code-quote">"direct:findAll"</span>)
+    .setBody().constant(<span class="code-quote">"{ \"</span>name\<span 
class="code-quote">": \"</span>Raul Kripalani\<span class="code-quote">" 
}"</span>)
     .to(<span 
class="code-quote">"mongodb:myDb?database=flights&amp;collection=tickets&amp;operation=findAll"</span>)
     .to(<span class="code-quote">"mock:resultFindAll"</span>);
 </pre>
@@ -430,7 +456,8 @@ from(<span class="code-quote">"mongodb:m
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
 <pre class="code-java">
-from(<span 
class="code-quote">"mongodb:myDb?database=flights&amp;collection=cancellations&amp;tailTrackIncreasingField=departureTime&amp;persistentTailTracking=<span
 class="code-keyword">true</span>&amp;persistentId=cancellationsTracker"</span>)
+from(<span 
class="code-quote">"mongodb:myDb?database=flights&amp;collection=cancellations&amp;tailTrackIncreasingField=departureTime&amp;persistentTailTracking=<span
 class="code-keyword">true</span>"</span> + 
+     <span class="code-quote">"&amp;persistentId=cancellationsTracker"</span>)
        .id(<span class="code-quote">"tailableCursorConsumer2"</span>)
        .autoStartup(<span class="code-keyword">false</span>)
        .to(<span class="code-quote">"mock:test"</span>);
@@ -441,8 +468,9 @@ from(<span class="code-quote">"mongodb:m
 
 <div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
 <pre class="code-java">
-from(<span 
class="code-quote">"mongodb:myDb?database=flights&amp;collection=cancellations&amp;tailTrackIncreasingField=departureTime&amp;persistentTailTracking=<span
 class="code-keyword">true</span>&amp;persistentId=cancellationsTracker"</span> 
+
-<span 
class="code-quote">"&amp;tailTrackDb=trackers&amp;tailTrackCollection=camelTrackers&amp;tailTrackField=lastProcessedDepartureTime"</span>)
+from(<span 
class="code-quote">"mongodb:myDb?database=flights&amp;collection=cancellations&amp;tailTrackIncreasingField=departureTime&amp;persistentTailTracking=<span
 class="code-keyword">true</span>"</span> + 
+     <span 
class="code-quote">"&amp;persistentId=cancellationsTracker"</span>&amp;tailTrackDb=trackers&amp;tailTrackCollection=camelTrackers"
 + 
+     <span 
class="code-quote">"&amp;tailTrackField=lastProcessedDepartureTime"</span>)
        .id(<span class="code-quote">"tailableCursorConsumer3"</span>)
        .autoStartup(<span class="code-keyword">false</span>)
        .to(<span class="code-quote">"mock:test"</span>);


Reply via email to