final version
This commit is contained in:
parent
b40cfbc901
commit
835b816388
@ -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