diff --git a/oracle-nosql/src/main/java/org/jnosql/demo/se/App.java b/oracle-nosql/src/main/java/org/jnosql/demo/se/App.java index fb6c6494..84512405 100644 --- a/oracle-nosql/src/main/java/org/jnosql/demo/se/App.java +++ b/oracle-nosql/src/main/java/org/jnosql/demo/se/App.java @@ -24,12 +24,12 @@ public static void main(String[] args) { Faker faker = new Faker(); try (SeContainer container = SeContainerInitializer.newInstance().initialize()) { DocumentTemplate template = container.select(DocumentTemplate.class).get(); - for (int index = 0; index < 0; index++) { + for (int index = 0; index < 10; index++) { Car car = Car.of(faker); template.insert(car); } - // template.select(Car.class).stream().toList().forEach(System.out::println); + template.select(Car.class).stream().toList().forEach(System.out::println); template.select(Car.class).where("transmission").eq("Automatic").orderBy("model").desc() .stream().forEach(System.out::println); diff --git a/oracle-nosql/src/main/java/org/jnosql/demo/se/App3.java b/oracle-nosql/src/main/java/org/jnosql/demo/se/App3.java index e324b8a1..614609a0 100644 --- a/oracle-nosql/src/main/java/org/jnosql/demo/se/App3.java +++ b/oracle-nosql/src/main/java/org/jnosql/demo/se/App3.java @@ -16,10 +16,14 @@ public static void main(String[] args) { try (SeContainer container = SeContainerInitializer.newInstance().initialize()) { Garage repository = container.select(Garage.class, DatabaseQualifier.ofDocument()).get(); for (int index = 0; index < 0; index++) { - Car beer = Car.of(faker); - repository.parking(beer); + Car car = Car.of(faker); + repository.parking(car); } + Car car = Car.of(faker); + repository.parking(car); + repository.unpark(car); + Pageable page = Pageable.ofPage(1).size(3).sortBy(Sort.desc("model")); Page page1 = repository.findByTransmission("CVT", page); System.out.println("The first page"); diff --git a/oracle-nosql/src/main/java/org/jnosql/demo/se/Garage.java b/oracle-nosql/src/main/java/org/jnosql/demo/se/Garage.java index 50c23624..4f6db3b0 100644 --- a/oracle-nosql/src/main/java/org/jnosql/demo/se/Garage.java +++ b/oracle-nosql/src/main/java/org/jnosql/demo/se/Garage.java @@ -14,7 +14,7 @@ public interface Garage extends DataRepository{ Car parking(Car car); @Delete - void departure(Car car); + void unpark(Car car); Page findByTransmission(String transmission, Pageable page); }