Skip to content

Commit 15298b1

Browse files
committed
Document public ScrollPosition factory methods.
Closes #2975
1 parent 0c9f477 commit 15298b1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/asciidoc/repositories-scrolling.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Similar to consuming a Java `Iterator<List<…>>` by obtaining the next batch of
1111

1212
[source,java]
1313
----
14-
Window<User> users = repository.findFirst10ByLastnameOrderByFirstname("Doe", OffsetScrollPosition.initial());
14+
Window<User> users = repository.findFirst10ByLastnameOrderByFirstname("Doe", ScrollPosition.offset());
1515
do {
1616
1717
for (User u : users) {
@@ -28,7 +28,7 @@ do {
2828
[source,java]
2929
----
3030
WindowIterator<User> users = WindowIterator.of(position -> repository.findFirst10ByLastnameOrderByFirstname("Doe", position))
31-
.startingAt(OffsetScrollPosition.initial());
31+
.startingAt(ScrollPosition.offset());
3232
3333
while (users.hasNext()) {
3434
User u = users.next();
@@ -53,7 +53,7 @@ interface UserRepository extends Repository<User, Long> {
5353
}
5454
5555
WindowIterator<User> users = WindowIterator.of(position -> repository.findFirst10ByLastnameOrderByFirstname("Doe", position))
56-
.startingAt(OffsetScrollPosition.initial()); <1>
56+
.startingAt(ScrollPosition.offset()); <1>
5757
----
5858
5959
<1> Start from the initial offset at position `0`.
@@ -91,7 +91,7 @@ interface UserRepository extends Repository<User, Long> {
9191
}
9292
9393
WindowIterator<User> users = WindowIterator.of(position -> repository.findFirst10ByLastnameOrderByFirstname("Doe", position))
94-
.startingAt(KeysetScrollPosition.initial()); <1>
94+
.startingAt(ScrollPosition.keyset()); <1>
9595
----
9696
<1> Start at the very beginning and do not apply additional filtering.
9797
====

0 commit comments

Comments
 (0)