org.melati.poem.util
Class PagedEnumerationBase

java.lang.Object
  extended by org.melati.poem.util.PagedEnumerationBase
All Implemented Interfaces:
java.util.Enumeration, PagedEnumeration
Direct Known Subclasses:
CountedDumbPagedEnumeration, DumbPagedEnumeration

public abstract class PagedEnumerationBase
extends java.lang.Object
implements PagedEnumeration

All the code common to CountedDumbPagedEnumeration and DumbPagedEnumeration.


Nested Class Summary
 class PagedEnumerationBase.Page
          A 'screen full' of results.
 
Constructor Summary
PagedEnumerationBase()
           
 
Method Summary
 int getCurrentPosition()
          
 int getNextPosition()
          
 int getPageEnd()
          
 java.util.Vector getPages()
           
 int getPageSize()
          
 int getPageStart()
          
 java.lang.Integer getPrevPageStart()
          
 int getTotalCount()
          
 boolean hasMoreElements()
          
 java.lang.Object nextElement()
          
 boolean nextElementOnThisPage()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.melati.poem.util.PagedEnumeration
getNextPageStart
 

Constructor Detail

PagedEnumerationBase

public PagedEnumerationBase()
Method Detail

hasMoreElements

public boolean hasMoreElements()

Specified by:
hasMoreElements in interface java.util.Enumeration
See Also:
Enumeration.hasMoreElements()

nextElement

public java.lang.Object nextElement()

Specified by:
nextElement in interface java.util.Enumeration
See Also:
Enumeration.nextElement()

getPageStart

public int getPageStart()

Specified by:
getPageStart in interface PagedEnumeration
Returns:
the start record of the page, indexed from 1.
See Also:
PagedEnumeration.getPageStart()

getPageEnd

public int getPageEnd()

Specified by:
getPageEnd in interface PagedEnumeration
Returns:
the end record of the page, indexed from 1.
See Also:
PagedEnumeration.getPageEnd()

getTotalCount

public int getTotalCount()

Specified by:
getTotalCount in interface PagedEnumeration
Returns:
the total number of items
See Also:
PagedEnumeration.getTotalCount()

getPrevPageStart

public java.lang.Integer getPrevPageStart()

Specified by:
getPrevPageStart in interface PagedEnumeration
Returns:
the start record of the previous page, indexed from 1.
See Also:
PagedEnumeration.getPrevPageStart()

getCurrentPosition

public int getCurrentPosition()

Specified by:
getCurrentPosition in interface PagedEnumeration
Returns:
where we are in the sequence
See Also:
PagedEnumeration.getCurrentPosition()

getNextPosition

public int getNextPosition()

Specified by:
getNextPosition in interface PagedEnumeration
Returns:
the position of the next element in the sequence
See Also:
PagedEnumeration.getNextPosition()

nextElementOnThisPage

public boolean nextElementOnThisPage()

Specified by:
nextElementOnThisPage in interface PagedEnumeration
Returns:
whether there are more elements on this page
See Also:
PagedEnumeration.nextElementOnThisPage()

getPageSize

public int getPageSize()

Specified by:
getPageSize in interface PagedEnumeration
Returns:
the number of elements on a page
See Also:
PagedEnumeration.getPageSize()

getPages

public java.util.Vector getPages()
Specified by:
getPages in interface PagedEnumeration
Returns:
the start position of page


Copyright © 2000-2008 PanEris. All Rights Reserved.