Skip to content

Commit

Permalink
feat: update documentaion
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <[email protected]>
  • Loading branch information
otaviojava committed Jan 24, 2024
1 parent 0cd81e6 commit ad8e5e1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<dependency>
<groupId>org.eclipse.jnosql.databases</groupId>
<artifactId>jnosql-mongodb</artifactId>
<version>${jnosql.version}</version>
<version>1.0.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.datafaker</groupId>
Expand Down
8 changes: 5 additions & 3 deletions mongodb/src/main/java/org/jnosql/demo/se/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
package org.jnosql.demo.se;


import jakarta.data.repository.Page;
import jakarta.data.repository.Pageable;
import jakarta.data.repository.Sort;

import jakarta.data.Sort;
import jakarta.data.page.Page;
import jakarta.data.page.Pageable;
import jakarta.enterprise.inject.se.SeContainer;
import jakarta.enterprise.inject.se.SeContainerInitializer;
import net.datafaker.Faker;


public class App {


Expand Down
19 changes: 13 additions & 6 deletions mongodb/src/main/java/org/jnosql/demo/se/App2.java
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);

}
}
}

0 comments on commit ad8e5e1

Please sign in to comment.