INT-3159: JPA: Add max-results Alias Attribute

JIRA: https://jira.springsource.org/browse/INT-3159

* Deprecate `max-number-of-results`
* Tests and Docs

Doc Polishing
This commit is contained in:
Artem Bilan
2013-11-20 19:46:07 +02:00
committed by Gary Russell
parent 405fce672b
commit 9c42a65e3c
7 changed files with 80 additions and 21 deletions

View File

@@ -409,6 +409,7 @@
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="" ]]><co id="inboundAdapterMaxResults2"/><![CDATA[
max-results-expression="" ]]><co id="inboundAdapterMaxResultsExpression"/><![CDATA[
delete-after-poll="true"> ]]><co id="inboundAdapterDeleteAfterPoll"/><![CDATA[
<int:poller fixed-rate="2000" >
@@ -452,16 +453,22 @@
</para>
</callout>
<callout arearefs="inboundAdapterMaxResults">
<para>
<emphasis>Deprecated</emphasis>. Use <code>max-results</code> instead.
<emphasis>Optional</emphasis>.
</para>
</callout>
<callout arearefs="inboundAdapterMaxResults2">
<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
all the possible records are selected by given query. This attribute is mutually exclusive with
<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
An expression, mutually exclusive with <code>max-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>
@@ -1155,6 +1162,7 @@ public class Student {
jpa-operations=""
jpa-query=""
max-number-of-results="" ]]><co id="outGateMaxNumOfResults"/><![CDATA[
max-results="" ]]><co id="outGateMaxNumOfResults2"/><![CDATA[
max-results-expression="" ]]><co id="outGateMaxNumOfResultsExpression"/><![CDATA[
first-result="" ]]><co id="outGateFirstResult"/><![CDATA[
first-result-expression="" ]]><co id="outGateFirstResultExpression"/><![CDATA[
@@ -1182,16 +1190,22 @@ public class Student {
</para>
</callout>
<callout arearefs="outGateMaxNumOfResults">
<para>
<emphasis>Deprecated</emphasis>. Use <code>max-results</code> instead.
<emphasis>Optional</emphasis>.
</para>
</callout>
<callout arearefs="outGateMaxNumOfResults2">
<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
all the possible records are selected by given query. This attribute is mutually exclusive with
<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
An expression, mutually exclusive with <code>max-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>

View File

@@ -604,13 +604,17 @@
</para>
</section>
<section id="3.0-jpa-max-results">
<title>JPA Adapters: max-results-expression attribute</title>
<title>JPA Adapters: max-results and max-results-expression Attributes</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"/>.
The JPA retrieving gateway and inbound adapter now have an attribute to specify the maximum
number of results in a result set as an expression. In addition, the
<code>max-results</code> attribute has been introduced to replace
<code>max-number-of-results</code>, which has been deprecated.
<code>max-results</code> and <code>max-results-expression</code>
are used to provide the maximum number of results,
or an expression to compute the maximum number of results, respectively, in the
result set.
For more information see <xref linkend="jpa"/>.
</para>
</section>
<section id="3.0-redis">
@@ -640,7 +644,7 @@
<para>
New <classname>FileListFilter</classname>s that use a persistent <classname>MetadataStore</classname> are
now available. These can be used to prevent duplicate files after a system restart. See
<xref linkend="file-reading"/>, <xref linkend="ftp-inbound"/>, and <xref linkend="sftp-inbound"/> for more information.
<xref linkend="file-reading"/>, <xref linkend="ftp-inbound"/>, and <xref linkend="sftp-inbound"/> for more information.
</para>
</section>
</section>