Package fr.gouv.vitam.common.model
Class DatabaseCursor
java.lang.Object
fr.gouv.vitam.common.model.DatabaseCursor
DatabaseCursor class Show database position of request response
-
Constructor Summary
ConstructorsConstructorDescriptionFor 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, String scrollId) DatabaseCursor constructor -
Method Summary
-
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 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
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 Details
-
getTotal
public long getTotal()- Returns:
- the total of units inserted/modified/selected as potential total response size (beyond current limit)
-
setTotal
- 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
- 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
- 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
- Parameters:
size
- the size as current response size- Returns:
- this
-
getScrollId
- Returns:
- the scrollId as current response size
-
setScrollId
- Parameters:
scrollId
- the cursorId as current response size- Returns:
- this
-