INT-3150: JPA: Add support for max-results-expression
JIRA: https://jira.springsource.org/browse/INT-3150
This commit is contained in:
@@ -408,6 +408,8 @@
|
||||
auto-startup="true" ]]><co id="inboundAdapterAutoStartup"/><![CDATA[
|
||||
query="select s from Student s" ]]><co id="inboundAdapterQuery"/><![CDATA[
|
||||
expect-single-result="true" ]]><co id="inboundAdapterExpectResult"/><![CDATA[
|
||||
max-number-of-results="" ]]><co id="inboundAdapterMaxResults"/><![CDATA[
|
||||
max-results-expression="" ]]><co id="inboundAdapterMaxResultsExpression"/><![CDATA[
|
||||
delete-after-poll="true"> ]]><co id="inboundAdapterDeleteAfterPoll"/><![CDATA[
|
||||
<int:poller fixed-rate="2000" >
|
||||
<int:transactional propagation="REQUIRED" transaction-manager="transactionManager"/>
|
||||
@@ -449,6 +451,21 @@
|
||||
<classname>MessagingException</classname> is thrown. The value defaults to <code>false</code>.
|
||||
</para>
|
||||
</callout>
|
||||
<callout arearefs="inboundAdapterMaxResults">
|
||||
<para>
|
||||
This non zero, non negative integer value tells the adapter not to select more than given number
|
||||
of rows on execution of the select operation. By default, if this attribute is not set,
|
||||
all the possible records are selected by given query. This attribute is mutually exclusive to
|
||||
<code>max-results-expression</code>. <emphasis>Optional</emphasis>.
|
||||
</para>
|
||||
</callout>
|
||||
<callout arearefs="inboundAdapterMaxResultsExpression">
|
||||
<para>
|
||||
An expression mutually exclusive to <code>max-number-of-results</code> that can
|
||||
be used to provide an expression that will be evaluated to find the maximum number of results
|
||||
in a result set. <emphasis>Optional</emphasis>.
|
||||
</para>
|
||||
</callout>
|
||||
<callout arearefs="inboundAdapterDeleteAfterPoll">
|
||||
<para>
|
||||
Set this value to <code>true</code> if you want
|
||||
@@ -1138,6 +1155,7 @@ public class Student {
|
||||
jpa-operations=""
|
||||
jpa-query=""
|
||||
max-number-of-results="" ]]><co id="outGateMaxNumOfResults"/><![CDATA[
|
||||
max-results-expression="" ]]><co id="outGateMaxNumOfResultsExpression"/><![CDATA[
|
||||
first-result="" ]]><co id="outGateFirstResult"/><![CDATA[
|
||||
first-result-expression="" ]]><co id="outGateFirstResultExpression"/><![CDATA[
|
||||
named-query=""
|
||||
@@ -1167,7 +1185,15 @@ public class Student {
|
||||
<para>
|
||||
This non zero, non negative integer value tells the adapter not to select more than given number
|
||||
of rows on execution of the select operation. By default, if this attribute is not set,
|
||||
all the possible records are selected by given query.<emphasis>Optional</emphasis>.
|
||||
all the possible records are selected by given query. This attribute is mutually exclusive to
|
||||
<code>max-results-expression</code>. <emphasis>Optional</emphasis>.
|
||||
</para>
|
||||
</callout>
|
||||
<callout arearefs="outGateMaxNumOfResultsExpression">
|
||||
<para>
|
||||
An expression mutually exclusive to <code>max-number-of-results</code> that can
|
||||
be used to provide an expression that will be evaluated to find the maximum number of results
|
||||
in a result set. <emphasis>Optional</emphasis>.
|
||||
</para>
|
||||
</callout>
|
||||
<callout arearefs="outGateFirstResult">
|
||||
@@ -1319,4 +1345,4 @@ public class Student {
|
||||
</note>
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
||||
</chapter>
|
||||
|
||||
@@ -471,7 +471,17 @@
|
||||
Retrieving gateways had no mechanism to specify the first record to be retrieved which
|
||||
is a common use case. The retrieving gateways now support specifying this parameter
|
||||
using a <code>first-result</code> and <code>first-result-expression</code> attributes
|
||||
to the gateway definition.<xref linkend="jpa-retrieving-outbound-gateway"/>
|
||||
to the gateway definition. <xref linkend="jpa-retrieving-outbound-gateway"/>.
|
||||
</para>
|
||||
</section>
|
||||
<section id="3.0-jpa-max-results">
|
||||
<title>JPA Adapters: max-results-expression attribute</title>
|
||||
<para>
|
||||
Retrieving gateways and inbound adapters now has a flexibility to specify the maximum
|
||||
number of results in a result set as an expression. We now have <code>max-number-of-results</code>
|
||||
and <code>max-results-expression</code> attributes which are used to provide the
|
||||
maximum number of results and the expression to compute the maximum number of results in the
|
||||
result set respectively. For more information see <xref linkend="jpa"/>.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user