How listPage(min, max) exactly works?

cancel
Showing results for 
Search instead for 
Did you mean: 
javadeveloper62
Member II

How listPage(min, max) exactly works?

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
gdharley
Intermediate

Re: How listPage(min, max) exactly works?

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