-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Otavio Santana <[email protected]>
- Loading branch information
1 parent
0cd81e6
commit ad8e5e1
Showing
3 changed files
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
package org.jnosql.demo.se; | ||
|
||
import jakarta.data.repository.Page; | ||
import jakarta.data.repository.Pageable; | ||
|
||
import jakarta.data.page.Page; | ||
import jakarta.data.page.Pageable; | ||
import jakarta.enterprise.inject.se.SeContainer; | ||
import jakarta.enterprise.inject.se.SeContainerInitializer; | ||
|
||
public class App2 { | ||
|
||
public static void main(String[] args) { | ||
People people = null; | ||
|
||
Page<Person> page = people.findAll(Pageable.ofPage(2).size(2)); | ||
Pageable nextPageable = page.nextPageable(); | ||
Page<Person> page2 = people.findAll(nextPageable); | ||
try (SeContainer container = SeContainerInitializer.newInstance().initialize()) { | ||
People people = container.select(People.class).get();; | ||
|
||
Page<Person> page = people.findAll(Pageable.ofPage(2).size(2)); | ||
Pageable nextPageable = page.nextPageable(); | ||
Page<Person> page2 = people.findAll(nextPageable); | ||
|
||
} | ||
} | ||
} |