Project

General

Profile

Actions

task #2250

open

TODO use AbstractPagerImpl.hasResultsInRange() where possible

Added by Andreas Kohlbecker about 11 years ago. Updated 5 months ago.

Status:
New
Priority:
Priority12
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Severity:
normal

Description

in all service methods returning lists or pagers the following statement is being used to check if the query would return any records.

if(numberOfResults > 0) { // no point checking again

this should be replaced by

if(AbstractPagerImpl.hasResultsInRange(numberOfResults, pageNumber, pageSize){ // no point checking again

I added according TODO comments to most of these cases.

The reason for this actually is a bug which did the calculation of hasResultsInRange incorrectly. So I decided that this should be done centrally in static method. The AbtractPagerImpl seems a good place for it since it is anyway planned to implement such functionality into it #691

Actions

Also available in: Atom PDF