|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.util.pager.Pager
public class Pager
Implements a generic pager. What is a pager? Let's say you have a large collection of objects, perhaps a long list of EJB Local Interfaces. You're interested in breaking the mammoth list out into a number pages, each with 25 items on it. You're interested in returning page #17 of such a collection. Why bother implementing the "skip past a bunch of things, then return pagesize items in the resultant colleciton" over and over again. You can also have the elements go through a _processor that you supply as they move from the source collection to the destination collection.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_PROCESSOR_CLASSNAME
|
Method Summary | |
---|---|
static Pager |
getDefaultPager()
|
static Pager |
getPager(java.lang.String className)
Get a pager based on the PagerProcessor supplied. |
PageList |
processAll(PageList source)
Process all objects in the source page list and return the destination page list with the same total size |
java.lang.Object |
processOne(java.lang.Object one)
|
void |
seek(java.util.Collection source,
java.util.Collection dest,
int pagenum,
int pagesize)
Seek to the specified pagenum in the source collection and place pagesize number of elements into the dest collection. |
int |
seek(java.util.Collection source,
java.util.Collection dest,
int pagenum,
int pagesize,
java.lang.Object procData)
Seek to the specified pagenum in the source collection and place pagesize number of elements into the dest collection. |
PageList |
seek(java.util.Collection source,
int pagenum,
int pagesize)
Seek to the specified pagenum in the source collection and return pagsize numberof of elements in the List. |
PageList |
seek(java.util.Collection source,
int pagenum,
int pagesize,
java.lang.Object procData)
Seek to the specified pagenum in the source collection and return pagsize numberof of elements in the List. |
PageList |
seek(java.util.Collection source,
PageControl pc)
Seek to the specified pagenum in the source collection and return pagsize numberof of elements in the List, as specified the PageControl object. |
PageList |
seek(java.util.Collection source,
PageControl pc,
java.lang.Object procData)
|
int |
seekAll(java.util.Collection source,
java.util.Collection dest,
int pagenum,
int pagesize,
java.lang.Object procData)
Seek to the specified pagenum in the source collection and place pagesize number of elements into the dest collection. |
PageList |
seekAll(java.util.Collection source,
int pagenum,
int pagesize,
java.lang.Object procData)
Seek to the specified pagenum in the source collection and place pagesize number of elements into the dest collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_PROCESSOR_CLASSNAME
Method Detail |
---|
public static Pager getDefaultPager()
public static Pager getPager(java.lang.String className) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
public PageList seek(java.util.Collection source, int pagenum, int pagesize)
source
- The source collection to seek through.pagenum
- The page number to seek to. If there not
enough pages in the collection, then an empty list will be returned.pagesize
- The size of each page.
public PageList seek(java.util.Collection source, PageControl pc)
source
- The source collection to seek through.pc
- The PageControl object to use to control paging.
public PageList seek(java.util.Collection source, PageControl pc, java.lang.Object procData)
public PageList seek(java.util.Collection source, int pagenum, int pagesize, java.lang.Object procData)
source
- The source collection to seek through.pagenum
- The page number to seek to. If there not
enough pages in the collection, then an empty list will be returned.pagesize
- The size of each page.procData
- - any data object required by the _processor.
public void seek(java.util.Collection source, java.util.Collection dest, int pagenum, int pagesize)
source
- The source collection to seek through.dest
- The collection to place results into.pagenum
- The page number to seek to. If there not
enough pages in the collection, then an empty list will be returned.pagesize
- The size of each page.public int seek(java.util.Collection source, java.util.Collection dest, int pagenum, int pagesize, java.lang.Object procData)
source
- The source collection to seek through.dest
- The collection to place results into.pagenum
- The page number to seek to. If there not
enough pages in the collection, then an empty list will be returned.pagesize
- The size of each page.procData
- any object required to process the item.public PageList seekAll(java.util.Collection source, int pagenum, int pagesize, java.lang.Object procData)
source
- The source collection to seek through.pagenum
- The page number to seek to. If there not
enough pages in the collection, then an empty list will be returned.pagesize
- The size of each page.procData
- any object required to process the item.public int seekAll(java.util.Collection source, java.util.Collection dest, int pagenum, int pagesize, java.lang.Object procData)
source
- The source collection to seek through.dest
- The collection to place results into.pagenum
- The page number to seek to. If there not
enough pages in the collection, then an empty list will be returned.pagesize
- The size of each page.procData
- any object required to process the item.public PageList processAll(PageList source)
public java.lang.Object processOne(java.lang.Object one)
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |