Package com.faunadb.client.query
Class Pagination
- java.lang.Object
-
- com.faunadb.client.query.Expr
-
- com.faunadb.client.query.Pagination
-
public final class Pagination extends Expr
A pagination expression. Instances of this class are not thread safe and must not be modified concurrently from different threads.See
Language.Paginate(Expr)
for details.- See Also:
- FaunaDB Read Functions,
Language.Paginate(Expr)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pagination
after(Expr cursor)
Sets the cursor of the pagination to move forward.Pagination
before(Expr cursor)
Sets the cursor of the pagination to move backwards.Pagination
cursor(Expr cursor)
Sets the cursor object of the pagination.Pagination
events(boolean events)
Define if the pagination should return events or not.Pagination
events(Expr events)
Define if the pagination should return events or not.Pagination
size(Expr size)
Sets the maximum number of elements per page to return.Pagination
size(Integer size)
Sets the maximum number of elements per page to return.Pagination
sources(boolean sources)
Define if the pagination should return source information or not.Pagination
sources(Expr sources)
Define if the pagination should return source information or not.protected Map<String,Expr>
toJson()
Pagination
ts(Expr ts)
Sets the timestamp for the pagination.Pagination
ts(Long ts)
Sets the timestamp for the pagination.
-
-
-
Method Detail
-
cursor
public Pagination cursor(Expr cursor)
Sets the cursor object of the pagination.- Parameters:
cursor
- the cursor object- Returns:
- this
Pagination
instance
-
before
public Pagination before(Expr cursor)
Sets the cursor of the pagination to move backwards.- Parameters:
cursor
- the before cursor- Returns:
- this
Pagination
instance
-
after
public Pagination after(Expr cursor)
Sets the cursor of the pagination to move forward.- Parameters:
cursor
- the after cursor- Returns:
- this
Pagination
instance
-
ts
public Pagination ts(Expr ts)
Sets the timestamp for the pagination.- Parameters:
ts
- the desired timestamp. Type: timestamp- Returns:
- this
Pagination
instance - See Also:
Language.Time(Expr)
,Language.Value(Instant)
-
ts
public Pagination ts(Long ts)
Sets the timestamp for the pagination.- Parameters:
ts
- the desired timestamp in UNIX microseconds- Returns:
- this
Pagination
instance
-
size
public Pagination size(Expr size)
Sets the maximum number of elements per page to return.- Parameters:
size
- the desired page size. Type: Number- Returns:
- this
Pagination
instance
-
size
public Pagination size(Integer size)
Sets the maximum number of elements per page to return.- Parameters:
size
- the desired page size- Returns:
- this
Pagination
instance
-
sources
public Pagination sources(Expr sources)
Define if the pagination should return source information or not. By default source information is not returned.- Parameters:
sources
- a boolean value- Returns:
- this
Pagination
instance
-
sources
public Pagination sources(boolean sources)
Define if the pagination should return source information or not. By default source information is not returned.- Parameters:
sources
- a boolean value- Returns:
- this
Pagination
instance
-
events
public Pagination events(Expr events)
Define if the pagination should return events or not. By default events are not returned.- Parameters:
events
- a boolean value- Returns:
- this
Pagination
instance
-
events
public Pagination events(boolean events)
Define if the pagination should return events or not. By default events are not returned.- Parameters:
events
- a boolean value- Returns:
- this
Pagination
instance
-
-