deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject deltaspike git commit: DELTASPIKE-1152 DELTASPIKE-1153 Doc clean up.
Date Mon, 23 May 2016 02:57:53 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 7c83662d0 -> 5466d6e89


DELTASPIKE-1152 DELTASPIKE-1153 Doc clean up.


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/5466d6e8
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/5466d6e8
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/5466d6e8

Branch: refs/heads/master
Commit: 5466d6e8951bce147dbfe95826d23c5d0a997694
Parents: 7c83662
Author: John D. Ament <johndament@apache.org>
Authored: Sun May 22 22:57:46 2016 -0400
Committer: John D. Ament <johndament@apache.org>
Committed: Sun May 22 22:57:46 2016 -0400

----------------------------------------------------------------------
 documentation/src/main/asciidoc/data.adoc | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/5466d6e8/documentation/src/main/asciidoc/data.adoc
----------------------------------------------------------------------
diff --git a/documentation/src/main/asciidoc/data.adoc b/documentation/src/main/asciidoc/data.adoc
index e8ea354..3681d71 100644
--- a/documentation/src/main/asciidoc/data.adoc
+++ b/documentation/src/main/asciidoc/data.adoc
@@ -465,13 +465,13 @@ module can translate method names following a given format and directly
 generate the query implementation out of it (in EBNF-like form):
 
 ----------------------------------------------------------------------------------
-(Entity|List<Entity>) findBy(Property[Comparator]){Operator Property [Comparator]}
+(Entity|List<Entity>) (prefix)(Property[Comparator]){Operator Property [Comparator]}
 ----------------------------------------------------------------------------------
 
 Or in more concrete words:
 
 * The query method must either return an entity or a list of entities.
-* It must start with the `findBy` keyword (or related `findOptionalBy`, `findAnyBy`).
+* It must start with the `findBy` prefix (or related `findOptionalBy`, `findAnyBy`, `findAll`,
`findFirst` or `findTop`).
 * 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.
 * You can add more blocks of property-comparator which have to be concatenated by a boolean
operator. This is either an `And` or `Or`.
 
@@ -524,8 +524,8 @@ public interface PersonRepository extends EntityRepository<Person,
Long>
 === Query Limits
 
 Starting with Apache DeltaSpike 1.6.2, you can apply query limits using method
-expressions.  They can be applied using `First` or `Top` keywords, in a method
-like this
+expressions.  They can be applied using `findFirst` or `findTop` prefixes in a
+method like this:
 
 [source,java]
 ------------------------------------------------------------------------------
@@ -540,6 +540,10 @@ public interface PersonRepository extends EntityRepository<Person,
Long>
 }
 ------------------------------------------------------------------------------
 
+The number following the prefix indicates how many to limit by, when setting
+the `maxResults` attribute of the underlying query.  You can pair this with
+a `@FirstResult` parameter to give consistent paging.
+
 Query Limits can be applied even when there is no where clause defined by your
 query.
 


Mime
View raw message