public class SimplePaginatedData<T> extends AbstractPaginatedData<T>
| Constructor and Description |
|---|
SimplePaginatedData(boolean hasPreviousPage,
boolean hasNextPage,
java.lang.Iterable<T> data) |
SimplePaginatedData(boolean hasPreviousPage,
boolean hasNextPage,
java.lang.Iterable<T> data,
java.lang.String prefix) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCursor(T entity)
creates the cursor by offset (i.e first entity has cursor 0, the second has 1 and so on)
NOTE: to make it consistent, please make the data ordered
|
hasNextPage, hasPreviousPage, iteratorpublic SimplePaginatedData(boolean hasPreviousPage,
boolean hasNextPage,
java.lang.Iterable<T> data)
public SimplePaginatedData(boolean hasPreviousPage,
boolean hasNextPage,
java.lang.Iterable<T> data,
java.lang.String prefix)
public java.lang.String getCursor(T entity)
entity - the entity