From 835b816388d34575d48c144f89529790f034abb3 Mon Sep 17 00:00:00 2001 From: Marcin Hutek Date: Tue, 2 Jan 2024 19:31:08 +0100 Subject: [PATCH] final version --- src/main/java/org/example/Queries.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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);