cancel
Showing results for 
Search instead for 
Did you mean: 

How listPage(min, max) exactly works?

javadeveloper62
Champ in-the-making
Champ in-the-making

Is anyone has idea about listPage(min,max) how exactly it works. 

repositoryService.createProcessDefinitionQuery().orderByDeploymentId().desc().listPage(0,10).

When I am using above query getting 10 records in descending order but not from all available records.

Please let me know if I am doing anything wrong in above query or listPage will work in this manner only.

1 REPLY 1

gdharley
Elite Collaborator
Elite Collaborator

Your command will only return the first 10 results.
You need to use the count() argument to see how many rows are available total and then you can use the min/max parameters to display a page at a time.

Perhaps I dont understand your problem.

Thanks,

Greg