Package fr.gouv.vitam.common.model

# Class DatabaseCursor

java.lang.Object
fr.gouv.vitam.common.model.DatabaseCursor

public class DatabaseCursor extends Object
DatabaseCursor class Show database position of request response

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DatabaseCursor()`
  For Json
  `DatabaseCursor(long total, long offset, long limit)`
  DatabaseCursor constructor
  `DatabaseCursor(long total, long offset, long limit, long size)`
  DatabaseCursor constructor
  `DatabaseCursor(long total, long offset, long limit, long size, String scrollId)`
  DatabaseCursor constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getLimit()`
  `long`
  `getOffset()`
  `String`
  `getScrollId()`
  `long`
  `getSize()`
  `long`
  `getTotal()`
  `DatabaseCursor`
  `setLimit(long limit)`
  `DatabaseCursor`
  `setOffset(long offset)`
  `DatabaseCursor`
  `setScrollId(String scrollId)`
  `DatabaseCursor`
  `setSize(long size)`
  `DatabaseCursor`
  `setTotal(long total)`

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

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

- ## Constructor Details

  - ### DatabaseCursor

    public DatabaseCursor()
    For Json

  - ### DatabaseCursor

    public DatabaseCursor(long total, long offset, long limit)
    DatabaseCursor constructor
    Parameters:
      `total` - total of inserted/modified/selected items
      `offset` - the offset of items in database
      `limit` - number limit of items per response

  - ### DatabaseCursor

    public DatabaseCursor(long total, long offset, long limit, long size)
    DatabaseCursor constructor
    Parameters:
      `total` - total of inserted/modified/selected items
      `offset` - the offset of items in database
      `limit` - number limit of items per response
      `size` - size of the current response

  - ### DatabaseCursor

    public DatabaseCursor(long total, long offset, long limit, long size, String scrollId)
    DatabaseCursor constructor
    Parameters:
      `total` - total of inserted/modified/selected items
      `offset` - the offset of items in database
      `limit` - number limit of items per response
      `size` - size of the current response
      `scrollId` - cursorId of the current response

- ## Method Details

  - ### getTotal

    public long getTotal()
    Returns:
      the total of units inserted/modified/selected as potential total response size (beyond current limit)

  - ### setTotal

    public DatabaseCursor setTotal(long total)
    Parameters:
      `total` - of units as integer
    Returns:
      the DatabaseCursor with the total is setted

  - ### getOffset

    public long getOffset()
    Returns:
      the offset of units in database

  - ### setOffset

    public DatabaseCursor setOffset(long offset)
    Parameters:
      `offset` - the offset of units in database
    Returns:
      the DatabaseCursor with the offset is setted

  - ### getLimit

    public long getLimit()
    Returns:
      the limit of units per response

  - ### setLimit

    public DatabaseCursor setLimit(long limit)
    Parameters:
      `limit` - limit of units as integer
    Returns:
      the DatabaseCursor with the limits of units is setted

  - ### getSize

    public long getSize()
    Returns:
      the size as current response size

  - ### setSize

    public DatabaseCursor setSize(long size)
    Parameters:
      `size` - the size as current response size
    Returns:
      this

  - ### getScrollId

    public String getScrollId()
    Returns:
      the scrollId as current response size

  - ### setScrollId

    public DatabaseCursor setScrollId(String scrollId)
    Parameters:
      `scrollId` - the cursorId as current response size
    Returns:
      this