org.melati.util
Class DumbPagedEnumeration

java.lang.Object
  extended by org.melati.util.PagedEnumerationBase
      extended by org.melati.util.DumbPagedEnumeration
All Implemented Interfaces:
java.util.Enumeration, PagedEnumeration

public class DumbPagedEnumeration
extends PagedEnumerationBase

A PagedEnumeration which doesn't know how big it is. Ideally SQL would allow you to start at an offset.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.melati.util.PagedEnumerationBase
PagedEnumerationBase.Page
 
Constructor Summary
DumbPagedEnumeration(java.util.Enumeration base, int pageStart, int pageSize, int countHorizon)
          Constructor.
 
Method Summary
 java.lang.Integer getNextPageStart()
          
 boolean getTotalCountIsMinimum()
           
 
Methods inherited from class org.melati.util.PagedEnumerationBase
getCurrentPosition, getNextPosition, getPageEnd, getPages, getPageSize, getPageStart, getPrevPageStart, getTotalCount, hasMoreElements, nextElement, nextElementOnThisPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DumbPagedEnumeration

public DumbPagedEnumeration(java.util.Enumeration base,
                            int pageStart,
                            int pageSize,
                            int countHorizon)
Constructor.

Parameters:
base - underlying Enumeration
pageStart - index of start of page
pageSize - how many Elements to include upon a page
countHorizon - where to count to, may be less than total size of underlying Enumeration
Method Detail

getNextPageStart

public java.lang.Integer getNextPageStart()

Returns:
the start record of the next page, indexed from 1.
See Also:
PagedEnumerationBase

getTotalCountIsMinimum

public boolean getTotalCountIsMinimum()
Returns:
whether there are more elements to come beyond horizon


Copyright © 2000-2008 PanEris. All Rights Reserved.