Project

General

Profile

« Previous | Next » 

Revision 892efc69

Added by Andreas Kohlbecker almost 14 years ago

merging /branches/cdmlib/SPRINT-Chichorieae1/ to trunk

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/pager/impl/AbstractPagerImpl.java
58 58
	 * 
59 59
	 * @param currentIndex the page of this result set (0-based), can be null 
60 60
	 * @param count the total number of results available for this query
61
	 * @param pageSize The size of pages (can be null if all results should be returned if available)
61
	 * @param pageSize The size of pages (can be null or 0 if all results should be returned if available)
62 62
	 * @param records A list of objects in this page (can be empty if there were no results)
63 63
	 */
64 64
	public AbstractPagerImpl(Integer currentIndex, Integer count, Integer pageSize, List<T> records) {
......
73 73
		indices = new ArrayList<Integer>();
74 74
		if(count == 0) {
75 75
			pagesAvailable = 1;
76
		} else if(pageSize != null) {
76
		} else if(pageSize != null && pageSize != 0) {
77 77
			 if( 0 == count % pageSize) {
78 78
				pagesAvailable = count / pageSize;
79 79

  

Also available in: Unified diff