Package org.bgerp.model

# Class Pageable<T>

java.lang.Object
org.bgerp.model.Pageable<T>

Direct Known Subclasses:
  `Data`, `QueryTable`, `SearchResult`

public class Pageable<T> extends Object
Pagination supporting search results list

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Pageable()`
  `Pageable(int pageSize)`
  Constructor with page size.
  `Pageable(DynActionForm form)`
  Constructor sets a created Pageable object to `form` response.
  `Pageable(DynActionForm form, int defaultPageSize)`
  Constructor sets a created Pageable object to `form` response.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(T item)`
  Adds an item to result list
  `List<T>`
  `getList()`
  `Page`
  `getPage()`
  `Pageable<T>`
  `withoutPagination()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Pageable

    public Pageable()

  - ### Pageable

    public Pageable(int pageSize)
    Constructor with page size.
    Parameters:
      `pageSize` -

  - ### Pageable

    public Pageable(DynActionForm form, int defaultPageSize)
    Constructor sets a created Pageable object to `form` response. Restores a page size from user personalization. If nothing is stored there, then `defaultPageSize` is used.
    Parameters:
      `form` - the form.
      `defaultPageSize` - the default page size.

  - ### Pageable

    public Pageable(DynActionForm form)
    Constructor sets a created Pageable object to `form` response. Restores a page size from user personalization. If nothing is stored there, then `Page.DEFAULT_PAGE_SIZE` is used.
    Parameters:
      `form` - the form.

- ## Method Details

  - ### withoutPagination

    public Pageable<T> withoutPagination()
    Returns:
      the instance with disabled pagination.

  - ### getPage

    public Page getPage()
    Returns:
      pagination options.

  - ### getList

    public List<T> getList()
    Returns:
      data list with a page content, the list is modifiable.

  - ### add

    public void add(T item)
    Adds an item to result list
    Parameters:
      `item` -