diff --git a/src/main/java/org/example/Queries.java b/src/main/java/org/example/Queries.java index 1703726..28266eb 100644 --- a/src/main/java/org/example/Queries.java +++ b/src/main/java/org/example/Queries.java @@ -40,9 +40,9 @@ public class Queries { // System.out.println("Film Title: " + filmTitle); // System.out.println("Language: " + filmLanguage); // System.out.println("-----------------------------------"); -// } +// } return results; - } + } // ZAPYTANIE Z PARAMETREM public List getFilmByLangCategory(String categoryName, String languageName) { @@ -81,10 +81,9 @@ public class Queries { Query queryTotal = session.createQuery("Select count(f) from FilmModel f"); long countResult = (long)queryTotal.getSingleResult(); - // create query Query query = session.createQuery("Select f from FilmModel f"); - //page size and number of pages + // rozmiar i liczba stron int pageSize = 10; int pageTotal = (int) ((countResult / pageSize) + 1);