PageControl (Hyperic HQ Plugin API)
Keywords: org.hyperic.util.pager.PageControl class

Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

## org.hyperic.util.pager
Class PageControl

    java.lang.Object
      org.hyperic.util.pager.PageControl

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

    public class PageControl

extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

A utility class to wrap up all the paging/sorting options that are frequently used with finders and other methods that return lists of things.

See Also:
  Serialized Form

Field Summary
`static PageControl` | `PAGE_ALL`
`static PageControl` | `PAGE_MIN`
`static PageControl` | `PAGE_NONE`
`static int` | `SIZE_UNLIMITED`
`static int` | `SORT_ASC`
`static int` | `SORT_DESC`
`static int` | `SORT_UNSORTED`
`static java.lang.String[]` | `SQL_SORTS` The SQL string representation of the above sort constants Note that the indices into this array line up with the constant values above for the SORT_XXX constants.

Constructor Summary
`PageControl()`
`PageControl(int pagenum, int pagesize)`
`PageControl(int pagenum, int pagesize, int sortorder, int sortattribute)`
`PageControl(PageControl pc)`

Method Summary
`java.lang.Object` | `clone()`
`boolean` | `equals(java.lang.Object o)`
`java.io.Serializable` | `getMetaData()`
`int` | `getPageEntityIndex()` Get the index of the first item on the page as dictated by the page size and page number.
`int` | `getPagenum()`
`int` | `getPagesize()`
`int` | `getSortattribute()`
`int` | `getSortorder()`
`int` | `hashCode()`
`static PageControl` | `initDefaults(PageControl pc, int defaultSortAttr)` sets the initial defaults for the PageControl.
`boolean` | `isAscending()`
`boolean` | `isDescending()`
`void` | `setMetaData(java.io.Serializable metaData)`
`void` | `setPagenum(int pagenum)`
`void` | `setPagesize(int pagesize)`
`void` | `setSortattribute(int attr)`
`void` | `setSortorder(int sortorder)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### SIZE_UNLIMITED

    public static final int SIZE_UNLIMITED

See Also:
  Constant Field Values

### SORT_UNSORTED

    public static final int SORT_UNSORTED

See Also:
  Constant Field Values

### SORT_ASC

    public static final int SORT_ASC

See Also:
  Constant Field Values

### SORT_DESC

    public static final int SORT_DESC

See Also:
  Constant Field Values

### SQL_SORTS

    public static final java.lang.String[] SQL_SORTS

  The SQL string representation of the above sort constants Note that the indices into this array line up with the constant values above for the SORT_XXX constants.

### PAGE_ALL

    public static final PageControl PAGE_ALL

### PAGE_NONE

    public static final PageControl PAGE_NONE

### PAGE_MIN

    public static final PageControl PAGE_MIN

Constructor Detail

### PageControl

    public PageControl()

### PageControl

    public PageControl(int pagenum,
                       int pagesize)

### PageControl

    public PageControl(int pagenum,
                       int pagesize,
                       int sortorder,
                       int sortattribute)

### PageControl

    public PageControl(PageControl pc)

Method Detail

### isAscending

    public boolean isAscending()

### isDescending

    public boolean isDescending()

### initDefaults

    public static PageControl initDefaults(PageControl pc,
                                           int defaultSortAttr)

  sets the initial defaults for the PageControl. Sort attribute specifies which attribute to sort on.

  Parameters:
    `pc` -
    `defaultSortAttr` - specifies the attribute to sort on.
  Returns:
    PageControl

### getPagenum

    public int getPagenum()

  Returns:
    The current page number (0-based)

### setPagenum

    public void setPagenum(int pagenum)

  Parameters:
    `pagenum` - Set the current page number to `pagenum`

### getPagesize

    public int getPagesize()

  Returns:
    The current page size

### setPagesize

    public void setPagesize(int pagesize)

  Parameters:
    `pagesize` - Set the current page size to this value

### getSortorder

    public int getSortorder()

  Returns:
    The sort order used. This is one of the SORT_XXX constants.

### setSortorder

    public void setSortorder(int sortorder)

  Parameters:
    `sortorder` - Sort order to use, one of the SORT_XXX constants.

### getSortattribute

    public int getSortattribute()

  Returns:
    The attribute that the sort is based on.

### setSortattribute

    public void setSortattribute(int attr)

  Parameters:
    `attr` - Set the attribute that the sort is based on.

### getMetaData

    public java.io.Serializable getMetaData()

### setMetaData

    public void setMetaData(java.io.Serializable metaData)

### getPageEntityIndex

    public int getPageEntityIndex()

  Get the index of the first item on the page as dictated by the page size and page number.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### clone

    public java.lang.Object clone()

  Overrides:
    `clone` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| 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

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.