Author: johndament
Date: Mon May 23 02:57:44 2016
New Revision: 1745105
URL: http://svn.apache.org/viewvc?rev=1745105&view=rev
Log:
Site checkin for project Apache DeltaSpike Documentation
Modified:
deltaspike/site/trunk/content/documentation/data.html
Modified: deltaspike/site/trunk/content/documentation/data.html
URL:
http://svn.apache.org/viewvc/deltaspike/site/trunk/content/documentation/data.html?rev=1745105&r1=1745104&r2=1745105&view=diff
==============================================================================
--- deltaspike/site/trunk/content/documentation/data.html (original)
+++ deltaspike/site/trunk/content/documentation/data.html Mon May 23 02:57:44
2016
@@ -815,7 +815,7 @@ generate the query implementation out of
</div>
<div class="listingblock">
<div class="content">
-<pre>(Entity|List<Entity>) findBy(Property[Comparator]){Operator
Property [Comparator]}</pre>
+<pre>(Entity|List<Entity>) (prefix)(Property[Comparator]){Operator
Property [Comparator]}</pre>
</div>
</div>
<div class="paragraph">
@@ -827,7 +827,7 @@ generate the query implementation out of
<p>The query method must either return an entity or a list of entities.</p>
</li>
<li>
-<p>It must start with the <code>findBy</code> keyword (or related
<code>findOptionalBy</code>, <code>findAnyBy</code>).</p>
+<p>It must start with the <code>findBy</code> prefix (or related
<code>findOptionalBy</code>, <code>findAnyBy</code>, <code>findAll</code>,
<code>findFirst</code> or <code>findTop</code>).</p>
</li>
<li>
<p>Followed by a property of the Repository entity and an optional comparator
(we’ll define this later). The property will be used in the query
together with the comparator. Note that the number of arguments passed to the
method depend on the comparator.</p>
@@ -949,8 +949,8 @@ you will notice early in case you have a
<h3 id="_query_limits">Query Limits</h3>
<div class="paragraph">
<p>Starting with Apache DeltaSpike 1.6.2, you can apply query limits using
method
-expressions. They can be applied using <code>First</code> or <code>Top</code>
keywords, in a method
-like this</p>
+expressions. They can be applied using <code>findFirst</code> or
<code>findTop</code> prefixes in a
+method like this:</p>
</div>
<div class="listingblock">
<div class="content">
@@ -966,6 +966,11 @@ like this</p>
</div>
</div>
<div class="paragraph">
+<p>The number following the prefix indicates how many to limit by, when setting
+the <code>maxResults</code> attribute of the underlying query. You can pair
this with
+a <code>@FirstResult</code> parameter to give consistent paging.</p>
+</div>
+<div class="paragraph">
<p>Query Limits can be applied even when there is no where clause defined by
your
query.</p>
</div>