Package com.io7m.idstore.database.api

# Class IdDatabaseUserSearchPaging

java.lang.Object
com.io7m.idstore.database.api.IdDatabaseUserSearchPaging

All Implemented Interfaces:
  `IdDatabasePagingType<IdUserSearchParameters,IdUserSummary,IdDatabaseUsersQueriesType>`, `IdDatabaseUserSearchPagingType`

public final class IdDatabaseUserSearchPaging extends Object implements IdDatabaseUserSearchPagingType
A paging handler for user summaries.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static IdDatabaseUserSearchPagingType`
  `create(IdUserSearchParameters inParameters)`
  A paging handler for user summaries.
  `int`
  `pageCount()`
  `List<IdUserSummary>`
  `pageCurrent(IdDatabaseUsersQueriesType queries)`
  Obtain the current page's values.
  `long`
  `pageFirstOffset()`
  `List<IdUserSummary>`
  `pageNext(IdDatabaseUsersQueriesType queries)`
  Seek to the next page and return values within that page.
  `boolean`
  `pageNextAvailable()`
  `int`
  `pageNumber()`
  `IdUserSearchParameters`
  `pageParameters()`
  `List<IdUserSummary>`
  `pagePrevious(IdDatabaseUsersQueriesType queries)`
  Seek to the previous page and return values within that page.

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

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

  ### Methods inherited from interface com.io7m.idstore.database.api.IdDatabasePagingType

  `pagePreviousAvailable`

- ## Method Details

  - ### create

    public static IdDatabaseUserSearchPagingType create(IdUserSearchParameters inParameters)
    A paging handler for user summaries.
    Parameters:
      `inParameters` - The user list parameters
    Returns:
      A paging handler

  - ### pageParameters

    public IdUserSearchParameters pageParameters()
    Specified by:
      `pageParameters` in interface `IdDatabasePagingType<IdUserSearchParameters,IdUserSummary,IdDatabaseUsersQueriesType>`
    Returns:
      The immutable page parameters used for the queries

  - ### pageNumber

    public int pageNumber()
    Specified by:
      `pageNumber` in interface `IdDatabasePagingType<IdUserSearchParameters,IdUserSummary,IdDatabaseUsersQueriesType>`
    Returns:
      The current page number

  - ### pageFirstOffset

    public long pageFirstOffset()
    Specified by:
      `pageFirstOffset` in interface `IdDatabasePagingType<IdUserSearchParameters,IdUserSummary,IdDatabaseUsersQueriesType>`
    Returns:
      The index of the first item in the current page

  - ### pageCount

    public int pageCount()
    Specified by:
      `pageCount` in interface `IdDatabasePagingType<IdUserSearchParameters,IdUserSummary,IdDatabaseUsersQueriesType>`
    Returns:
      An approximate count of the number of available pages

  - ### pageNextAvailable

    public boolean pageNextAvailable()
    Specified by:
      `pageNextAvailable` in interface `IdDatabasePagingType<IdUserSearchParameters,IdUserSummary,IdDatabaseUsersQueriesType>`
    Returns:
      `true` If the next page is currently available

  - ### pagePrevious

    public List<IdUserSummary> pagePrevious(IdDatabaseUsersQueriesType queries) throws IdDatabaseException
    Description copied from interface: `IdDatabasePagingType`
    Seek to the previous page and return values within that page.
    Specified by:
      `pagePrevious` in interface `IdDatabasePagingType<IdUserSearchParameters,IdUserSummary,IdDatabaseUsersQueriesType>`
    Parameters:
      `queries` - The queries
    Returns:
      The page's results
    Throws:
      `IdDatabaseException` - On database errors

  - ### pageNext

    public List<IdUserSummary> pageNext(IdDatabaseUsersQueriesType queries) throws IdDatabaseException
    Description copied from interface: `IdDatabasePagingType`
    Seek to the next page and return values within that page.
    Specified by:
      `pageNext` in interface `IdDatabasePagingType<IdUserSearchParameters,IdUserSummary,IdDatabaseUsersQueriesType>`
    Parameters:
      `queries` - The queries
    Returns:
      The page's results
    Throws:
      `IdDatabaseException` - On database errors

  - ### pageCurrent

    public List<IdUserSummary> pageCurrent(IdDatabaseUsersQueriesType queries) throws IdDatabaseException
    Description copied from interface: `IdDatabasePagingType`
    Obtain the current page's values.
    Specified by:
      `pageCurrent` in interface `IdDatabasePagingType<IdUserSearchParameters,IdUserSummary,IdDatabaseUsersQueriesType>`
    Parameters:
      `queries` - The queries
    Returns:
      The page's results
    Throws:
      `IdDatabaseException` - On database errors