how to use findAll(Sort sort) and new PageRequest(int page, int size, Sort sort )?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to use findAll(Sort sort) and new PageRequest(int page, int size, Sort sort )?

lacribeiro11
Hi everyone,
i am trying to run the following code:

example: contactRepository.findAll(Sort.Direction.DESC);
or Page page = new PageRequest(0, 120, Sort.Direction.DESC)
but it fails because the Sort is wrong.

I tried many time without success to initialize the variable Sort. I searched also in the Internet but, still I didn't found anything about I was looking for.

Does someone worked with Sort with Wicket? if could you post an example or a link?
Thank you so very much
Camara