final version
This commit is contained in:
parent
b40cfbc901
commit
835b816388
@ -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<Object[]> 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<FilmModel> 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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user