Package im.getsocial.sdk.common
Class PagingQuery<Query>
- java.lang.Object
-
- im.getsocial.sdk.common.PagingQuery<Query>
-
- Type Parameters:
Query
- type of underlaying query.
- Direct Known Subclasses:
SimplePagingQuery
public class PagingQuery<Query> extends java.lang.Object
Generic class for making paging queries.
-
-
Constructor Summary
Constructors Constructor Description PagingQuery(Query query)
Create paging query.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLimit()
java.lang.String
getNext()
Query
getQuery()
PagingQuery<Query>
next(java.lang.String nextCursor)
Set next cursor.PagingQuery<Query>
withLimit(int limit)
Set the limit of query.
-
-
-
Constructor Detail
-
PagingQuery
public PagingQuery(Query query)
Create paging query.- Parameters:
query
- underlaying query.
-
-
Method Detail
-
withLimit
public PagingQuery<Query> withLimit(int limit)
Set the limit of query. Not more items will be in resulting list.- Parameters:
limit
- new limit.- Returns:
- same instance.
-
next
public PagingQuery<Query> next(java.lang.String nextCursor)
Set next cursor. You should save it from the previous response and pass to the new query.- Parameters:
nextCursor
- Value from previousPagingResult
.- Returns:
- same instance.
-
getQuery
public Query getQuery()
- Returns:
- underlaying query.
-
getLimit
public int getLimit()
- Returns:
- the limit.
-
getNext
public java.lang.String getNext()
- Returns:
- next cursor.
-
-