Package fr.gouv.vitam.common.model
Class DatabaseCursor
- java.lang.Object
-
- fr.gouv.vitam.common.model.DatabaseCursor
-
public class DatabaseCursor extends java.lang.Object
DatabaseCursor class Show database position of request response
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DatabaseCursor()
For JsonDatabaseCursor(long total, long offset, long limit)
DatabaseCursor constructorDatabaseCursor(long total, long offset, long limit, long size)
DatabaseCursor constructorDatabaseCursor(long total, long offset, long limit, long size, java.lang.String scrollId)
DatabaseCursor constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getLimit()
long
getOffset()
java.lang.String
getScrollId()
long
getSize()
long
getTotal()
DatabaseCursor
setLimit(long limit)
DatabaseCursor
setOffset(long offset)
DatabaseCursor
setScrollId(java.lang.String scrollId)
DatabaseCursor
setSize(long size)
DatabaseCursor
setTotal(long total)
-
-
-
Constructor Detail
-
DatabaseCursor
protected DatabaseCursor()
For Json
-
DatabaseCursor
public DatabaseCursor(long total, long offset, long limit)
DatabaseCursor constructor- Parameters:
total
- total of inserted/modified/selected itemsoffset
- the offset of items in databaselimit
- 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 itemsoffset
- the offset of items in databaselimit
- number limit of items per responsesize
- size of the current response
-
DatabaseCursor
public DatabaseCursor(long total, long offset, long limit, long size, java.lang.String scrollId)
DatabaseCursor constructor- Parameters:
total
- total of inserted/modified/selected itemsoffset
- the offset of items in databaselimit
- number limit of items per responsesize
- size of the current responsescrollId
- cursorId of the current response
-
-
Method Detail
-
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 java.lang.String getScrollId()
- Returns:
- the scrollId as current response size
-
setScrollId
public DatabaseCursor setScrollId(java.lang.String scrollId)
- Parameters:
scrollId
- the cursorId as current response size- Returns:
- this
-
-