Author: buildbot
Date: Fri Apr  6 08:22:06 2012
New Revision: 811671

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/book-component-appendix.html
    websites/production/camel/content/book-in-one-page.html
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/mybatis.html

Modified: websites/production/camel/content/book-component-appendix.html
==============================================================================
--- websites/production/camel/content/book-component-appendix.html (original)
+++ websites/production/camel/content/book-component-appendix.html Fri Apr  6 
08:22:06 2012
@@ -11402,7 +11402,7 @@ If the file is located in another locati
 
 <h3><a shape="rect" name="BookComponentAppendix-Options"></a>Options</h3>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"> Option </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Type </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Default </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>consumer.onConsume</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Statements to run after consuming. Can be 
used, for example, to update rows after they have been consumed and processed 
in Camel. See sample later. Multiple statements can be separated with comma. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.useIterator</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" 
class="confluence
 Td"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If 
<tt>true</tt> each row returned when polling will be processed individually. If 
<tt>false</tt> the entire <tt>List</tt> of data is set as the IN body. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.routeEmptyResultSet</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Sets whether empty result set should be routed or not. By 
default, empty result sets are not routed. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>statementType</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>StatementType</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Mandatory to specify for producer to control 
which kind of operation to 
 invoke. The enum values are: <tt>SelectOne</tt>, <tt>SelectList</tt>, 
<tt>Insert</tt>, <tt>Update</tt>, <tt>Delete</tt>. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>maxMessagesPerPoll</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>int</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> An integer to define a maximum messages to 
gather per poll. By default, no maximum is set. Can be used to set a limit of 
e.g. 1000 to avoid when starting up the server that there are thousands of 
files. Set a value of 0 or negative to disabled it. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"> Option </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Type </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Default </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>consumer.onConsume</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Statements to run after consuming. Can be 
used, for example, to update rows after they have been consumed and processed 
in Camel. See sample later. Multiple statements can be separated with comma. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.useIterator</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" 
class="confluence
 Td"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If 
<tt>true</tt> each row returned when polling will be processed individually. If 
<tt>false</tt> the entire <tt>List</tt> of data is set as the IN body. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.routeEmptyResultSet</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Sets whether empty result set should be routed or not. By 
default, empty result sets are not routed. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>statementType</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>StatementType</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Mandatory to specify for producer to control 
which kind of operation to 
 invoke. The enum values are: <tt>SelectOne</tt>, <tt>SelectList</tt>, 
<tt>Insert</tt>, <tt>InsertList</tt>, <tt>Update</tt>, <tt>Delete</tt>. 
<b>Notice:</b> <tt>InsertList</tt> is available as of Camel 2.10. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>maxMessagesPerPoll</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>int</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> An integer to define a maximum messages to gather per 
poll. By default, no maximum is set. Can be used to set a limit of e.g. 1000 to 
avoid when starting up the server that there are thousands of files. Set a 
value of 0 or negative to disabled it. </td></tr></tbody></table>
 </div>
 </div>
 
@@ -11474,6 +11474,36 @@ from(<span class="code-quote">"activemq:
 </pre>
 </div></div>
 
+<h4><a shape="rect" 
name="BookComponentAppendix-UsingInsertListStatementType"></a>Using InsertList 
StatementType</h4>
+<p><b>Available as of Camel 2.10</b></p>
+
+<p>MyBatis allows you to insert multiple rows using its for-each batch driver. 
To use this, you need to use the &lt;foreach&gt; in the mapper XML file. For 
example as shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<pre class="code-xml"><span class="code-tag"><span 
class="code-comment">&lt;!-- Batch Insert example, using the Account parameter 
class --&gt;</span></span>
+<span class="code-tag">&lt;insert id=<span 
class="code-quote">"batchInsertAccount"</span> parameterType=<span 
class="code-quote">"java.util.List"</span>&gt;</span>
+    insert into ACCOUNT (
+    ACC_ID,
+    ACC_FIRST_NAME,
+    ACC_LAST_NAME,
+    ACC_EMAIL
+    )
+    values (
+    <span class="code-tag">&lt;foreach item=<span 
class="code-quote">"Account"</span> collection=<span 
class="code-quote">"list"</span> open=<span class="code-quote">"" 
close="</span><span class="code-quote">" separator="</span>),("&gt;</span>
+        #{Account.id}, #{Account.firstName}, #{Account.lastName}, 
#{Account.emailAddress}
+    <span class="code-tag">&lt;/foreach&gt;</span>
+    )
+<span class="code-tag">&lt;/insert&gt;</span>
+</pre>
+</div></div>
+
+<p>Then you can insert multiple rows, by sending a Camel message to the 
<tt>mybatis</tt> endpoint which uses the <tt>InsertList</tt> statement type, as 
shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<pre class="code-java">from(<span class="code-quote">"direct:start"</span>)
+    .to(<span 
class="code-quote">"mybatis:batchInsertAccount?statementType=InsertList"</span>)
+    .to(<span class="code-quote">"mock:result"</span>);
+</pre>
+</div></div>
+
 
 <h4><a shape="rect" 
name="BookComponentAppendix-Scheduledpollingexample"></a>Scheduled polling 
example</h4>
 <p>Since this component does not support scheduled polling, you need to use 
another mechanism for triggering the scheduled polls, such as the <a 
shape="rect" href="timer.html" title="Timer">Timer</a> or <a shape="rect" 
href="quartz.html" title="Quartz">Quartz</a> components.</p>

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Fri Apr  6 08:22:06 
2012
@@ -31563,7 +31563,7 @@ If the file is located in another locati
 
 <h3><a shape="rect" name="BookInOnePage-Options"></a>Options</h3>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"> Option </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Type </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Default </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>consumer.onConsume</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Statements to run after consuming. Can be 
used, for example, to update rows after they have been consumed and processed 
in Camel. See sample later. Multiple statements can be separated with comma. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.useIterator</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" 
class="confluence
 Td"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If 
<tt>true</tt> each row returned when polling will be processed individually. If 
<tt>false</tt> the entire <tt>List</tt> of data is set as the IN body. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.routeEmptyResultSet</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Sets whether empty result set should be routed or not. By 
default, empty result sets are not routed. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>statementType</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>StatementType</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Mandatory to specify for producer to control 
which kind of operation to 
 invoke. The enum values are: <tt>SelectOne</tt>, <tt>SelectList</tt>, 
<tt>Insert</tt>, <tt>Update</tt>, <tt>Delete</tt>. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>maxMessagesPerPoll</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>int</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> An integer to define a maximum messages to 
gather per poll. By default, no maximum is set. Can be used to set a limit of 
e.g. 1000 to avoid when starting up the server that there are thousands of 
files. Set a value of 0 or negative to disabled it. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"> Option </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Type </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Default </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>consumer.onConsume</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Statements to run after consuming. Can be 
used, for example, to update rows after they have been consumed and processed 
in Camel. See sample later. Multiple statements can be separated with comma. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.useIterator</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" 
class="confluence
 Td"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If 
<tt>true</tt> each row returned when polling will be processed individually. If 
<tt>false</tt> the entire <tt>List</tt> of data is set as the IN body. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.routeEmptyResultSet</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Sets whether empty result set should be routed or not. By 
default, empty result sets are not routed. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>statementType</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>StatementType</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Mandatory to specify for producer to control 
which kind of operation to 
 invoke. The enum values are: <tt>SelectOne</tt>, <tt>SelectList</tt>, 
<tt>Insert</tt>, <tt>InsertList</tt>, <tt>Update</tt>, <tt>Delete</tt>. 
<b>Notice:</b> <tt>InsertList</tt> is available as of Camel 2.10. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>maxMessagesPerPoll</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>int</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> An integer to define a maximum messages to gather per 
poll. By default, no maximum is set. Can be used to set a limit of e.g. 1000 to 
avoid when starting up the server that there are thousands of files. Set a 
value of 0 or negative to disabled it. </td></tr></tbody></table>
 </div>
 </div>
 
@@ -31635,6 +31635,36 @@ from(<span class="code-quote">"activemq:
 </pre>
 </div></div>
 
+<h4><a shape="rect" 
name="BookInOnePage-UsingInsertListStatementType"></a>Using InsertList 
StatementType</h4>
+<p><b>Available as of Camel 2.10</b></p>
+
+<p>MyBatis allows you to insert multiple rows using its for-each batch driver. 
To use this, you need to use the &lt;foreach&gt; in the mapper XML file. For 
example as shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<pre class="code-xml"><span class="code-tag"><span 
class="code-comment">&lt;!-- Batch Insert example, using the Account parameter 
class --&gt;</span></span>
+<span class="code-tag">&lt;insert id=<span 
class="code-quote">"batchInsertAccount"</span> parameterType=<span 
class="code-quote">"java.util.List"</span>&gt;</span>
+    insert into ACCOUNT (
+    ACC_ID,
+    ACC_FIRST_NAME,
+    ACC_LAST_NAME,
+    ACC_EMAIL
+    )
+    values (
+    <span class="code-tag">&lt;foreach item=<span 
class="code-quote">"Account"</span> collection=<span 
class="code-quote">"list"</span> open=<span class="code-quote">"" 
close="</span><span class="code-quote">" separator="</span>),("&gt;</span>
+        #{Account.id}, #{Account.firstName}, #{Account.lastName}, 
#{Account.emailAddress}
+    <span class="code-tag">&lt;/foreach&gt;</span>
+    )
+<span class="code-tag">&lt;/insert&gt;</span>
+</pre>
+</div></div>
+
+<p>Then you can insert multiple rows, by sending a Camel message to the 
<tt>mybatis</tt> endpoint which uses the <tt>InsertList</tt> statement type, as 
shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<pre class="code-java">from(<span class="code-quote">"direct:start"</span>)
+    .to(<span 
class="code-quote">"mybatis:batchInsertAccount?statementType=InsertList"</span>)
+    .to(<span class="code-quote">"mock:result"</span>);
+</pre>
+</div></div>
+
 
 <h4><a shape="rect" name="BookInOnePage-Scheduledpollingexample"></a>Scheduled 
polling example</h4>
 <p>Since this component does not support scheduled polling, you need to use 
another mechanism for triggering the scheduled polls, such as the <a 
shape="rect" href="timer.html" title="Timer">Timer</a> or <a shape="rect" 
href="quartz.html" title="Quartz">Quartz</a> components.</p>

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

Modified: websites/production/camel/content/mybatis.html
==============================================================================
--- websites/production/camel/content/mybatis.html (original)
+++ websites/production/camel/content/mybatis.html Fri Apr  6 08:22:06 2012
@@ -109,7 +109,7 @@ If the file is located in another locati
 
 <h3><a shape="rect" name="MyBatis-Options"></a>Options</h3>
 <div class="confluenceTableSmall"><div class="table-wrap">
-<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"> Option </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Type </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Default </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>consumer.onConsume</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Statements to run after consuming. Can be 
used, for example, to update rows after they have been consumed and processed 
in Camel. See sample later. Multiple statements can be separated with comma. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.useIterator</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" 
class="confluence
 Td"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If 
<tt>true</tt> each row returned when polling will be processed individually. If 
<tt>false</tt> the entire <tt>List</tt> of data is set as the IN body. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.routeEmptyResultSet</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Sets whether empty result set should be routed or not. By 
default, empty result sets are not routed. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>statementType</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>StatementType</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Mandatory to specify for producer to control 
which kind of operation to 
 invoke. The enum values are: <tt>SelectOne</tt>, <tt>SelectList</tt>, 
<tt>Insert</tt>, <tt>Update</tt>, <tt>Delete</tt>. </td></tr><tr><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>maxMessagesPerPoll</tt> 
</td><td colspan="1" rowspan="1" class="confluenceTd"> <tt>int</tt> </td><td 
colspan="1" rowspan="1" class="confluenceTd"> <tt>0</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> An integer to define a maximum messages to 
gather per poll. By default, no maximum is set. Can be used to set a limit of 
e.g. 1000 to avoid when starting up the server that there are thousands of 
files. Set a value of 0 or negative to disabled it. </td></tr></tbody></table>
+<table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" 
class="confluenceTh"> Option </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Type </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Default </th><th colspan="1" rowspan="1" 
class="confluenceTh"> Description </th></tr><tr><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>consumer.onConsume</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>String</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Statements to run after consuming. Can be 
used, for example, to update rows after they have been consumed and processed 
in Camel. See sample later. Multiple statements can be separated with comma. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.useIterator</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" 
class="confluence
 Td"> <tt>true</tt> </td><td colspan="1" rowspan="1" class="confluenceTd"> If 
<tt>true</tt> each row returned when polling will be processed individually. If 
<tt>false</tt> the entire <tt>List</tt> of data is set as the IN body. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>consumer.routeEmptyResultSet</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>boolean</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>false</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> Sets whether empty result set should be routed or not. By 
default, empty result sets are not routed. </td></tr><tr><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>statementType</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>StatementType</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> <tt>null</tt> </td><td colspan="1" 
rowspan="1" class="confluenceTd"> Mandatory to specify for producer to control 
which kind of operation to 
 invoke. The enum values are: <tt>SelectOne</tt>, <tt>SelectList</tt>, 
<tt>Insert</tt>, <tt>InsertList</tt>, <tt>Update</tt>, <tt>Delete</tt>. 
<b>Notice:</b> <tt>InsertList</tt> is available as of Camel 2.10. 
</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"> 
<tt>maxMessagesPerPoll</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>int</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> <tt>0</tt> </td><td colspan="1" rowspan="1" 
class="confluenceTd"> An integer to define a maximum messages to gather per 
poll. By default, no maximum is set. Can be used to set a limit of e.g. 1000 to 
avoid when starting up the server that there are thousands of files. Set a 
value of 0 or negative to disabled it. </td></tr></tbody></table>
 </div>
 </div>
 
@@ -181,6 +181,36 @@ from(<span class="code-quote">"activemq:
 </pre>
 </div></div>
 
+<h4><a shape="rect" name="MyBatis-UsingInsertListStatementType"></a>Using 
InsertList StatementType</h4>
+<p><b>Available as of Camel 2.10</b></p>
+
+<p>MyBatis allows you to insert multiple rows using its for-each batch driver. 
To use this, you need to use the &lt;foreach&gt; in the mapper XML file. For 
example as shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<pre class="code-xml"><span class="code-tag"><span 
class="code-comment">&lt;!-- Batch Insert example, using the Account parameter 
class --&gt;</span></span>
+<span class="code-tag">&lt;insert id=<span 
class="code-quote">"batchInsertAccount"</span> parameterType=<span 
class="code-quote">"java.util.List"</span>&gt;</span>
+    insert into ACCOUNT (
+    ACC_ID,
+    ACC_FIRST_NAME,
+    ACC_LAST_NAME,
+    ACC_EMAIL
+    )
+    values (
+    <span class="code-tag">&lt;foreach item=<span 
class="code-quote">"Account"</span> collection=<span 
class="code-quote">"list"</span> open=<span class="code-quote">"" 
close="</span><span class="code-quote">" separator="</span>),("&gt;</span>
+        #{Account.id}, #{Account.firstName}, #{Account.lastName}, 
#{Account.emailAddress}
+    <span class="code-tag">&lt;/foreach&gt;</span>
+    )
+<span class="code-tag">&lt;/insert&gt;</span>
+</pre>
+</div></div>
+
+<p>Then you can insert multiple rows, by sending a Camel message to the 
<tt>mybatis</tt> endpoint which uses the <tt>InsertList</tt> statement type, as 
shown below:</p>
+<div class="code panel" style="border-width: 1px;"><div class="codeContent 
panelContent">
+<pre class="code-java">from(<span class="code-quote">"direct:start"</span>)
+    .to(<span 
class="code-quote">"mybatis:batchInsertAccount?statementType=InsertList"</span>)
+    .to(<span class="code-quote">"mock:result"</span>);
+</pre>
+</div></div>
+
 
 <h4><a shape="rect" name="MyBatis-Scheduledpollingexample"></a>Scheduled 
polling example</h4>
 <p>Since this component does not support scheduled polling, you need to use 
another mechanism for triggering the scheduled polls, such as the <a 
shape="rect" href="timer.html" title="Timer">Timer</a> or <a shape="rect" 
href="quartz.html" title="Quartz">Quartz</a> components.</p>


Reply via email to