Skip to content

Commit 8d54cae

Browse files
Polishing.
Update Query javadoc. Original Pull Request: #3999
1 parent 14a71f0 commit 8d54cae

File tree

1 file changed

+9
-7
lines changed
  • spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query

1 file changed

+9
-7
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Query.java

+9-7
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ public Field fields() {
122122
}
123123

124124
/**
125-
* Set number of documents to skip before returning results.
125+
* Set number of documents to skip before returning results. Use {@literal zero} or a {@literal negative} value to
126+
* avoid skipping.
126127
*
127-
* @param skip
128+
* @param skip number of documents to skip. Use {@literal zero} or a {@literal negative} value to avoid skipping.
128129
* @return this.
129130
*/
130131
public Query skip(long skip) {
@@ -133,10 +134,10 @@ public Query skip(long skip) {
133134
}
134135

135136
/**
136-
* Limit the number of returned documents to {@code limit}.
137-
* If limit chosen is 0 it returns all documents
137+
* Limit the number of returned documents to {@code limit}. A {@literal zero} or {@literal negative} value is
138+
* considered as unlimited.
138139
*
139-
* @param limit
140+
* @param limit number of documents to return. Use {@literal zero} or {@literal negative} for unlimited.
140141
* @return this.
141142
*/
142143
public Query limit(int limit) {
@@ -313,7 +314,7 @@ public boolean isSorted() {
313314
}
314315

315316
/**
316-
* Get the number of documents to skip.
317+
* Get the number of documents to skip. {@literal Zero} or a {@literal negative} value indicates no skip.
317318
*
318319
* @return number of documents to skip
319320
*/
@@ -322,7 +323,8 @@ public long getSkip() {
322323
}
323324

324325
/**
325-
* Get the maximum number of documents to be return.
326+
* Get the maximum number of documents to be return. {@literal Zero} or a {@literal negative} value indicates no
327+
* limit.
326328
*
327329
* @return number of documents to return.
328330
*/

0 commit comments

Comments
 (0)