Class GraphQLPageResponse<T>
- java.lang.Object
-
- com.atlassian.confluence.rest.serialization.graphql.GraphQLPagination<T>
-
- com.atlassian.confluence.rest.serialization.graphql.GraphQLPageResponse<T>
-
- All Implemented Interfaces:
PageResponse<T>,Iterable<T>
public class GraphQLPageResponse<T> extends GraphQLPagination<T> implements PageResponse<T>
A graphql formatted pagination response. See http://graphql.org/learn/pagination for more information on the rationale for the structure of this data type.- Since:
- 6.12.0
-
-
Constructor Summary
Constructors Constructor Description GraphQLPageResponse()GraphQLPageResponse(PageResponse<T> pageResponse, BiFunction<T,Integer,String> cursorMapper)GraphQLPageResponse(PageResponse<T> pageResponse, List<GraphQLPaginationEdge<T>> edges)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PageRequestgetPageRequest()List<T>getResults()booleanhasMore()Indicates whether the source has more results after this page.Iterator<T>iterator()intsize()-
Methods inherited from class com.atlassian.confluence.rest.serialization.graphql.GraphQLPagination
buildEdges, getCount, getEdges, getNodes, getPageInfo, load, setCount, setEdges, setNodes, setPageInfo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface com.atlassian.confluence.api.model.pagination.PageResponse
getNextCursor, getPrevCursor
-
-
-
-
Constructor Detail
-
GraphQLPageResponse
public GraphQLPageResponse()
-
GraphQLPageResponse
public GraphQLPageResponse(PageResponse<T> pageResponse, BiFunction<T,Integer,String> cursorMapper)
-
GraphQLPageResponse
public GraphQLPageResponse(PageResponse<T> pageResponse, List<GraphQLPaginationEdge<T>> edges)
-
-
Method Detail
-
getResults
public List<T> getResults()
- Specified by:
getResultsin interfacePageResponse<T>- Returns:
- the results
-
size
public int size()
- Specified by:
sizein interfacePageResponse<T>- Returns:
- the number of results in this page of results
-
hasMore
public boolean hasMore()
Description copied from interface:PageResponseIndicates whether the source has more results after this page.- Specified by:
hasMorein interfacePageResponse<T>- Returns:
- true if there are more results
-
getPageRequest
public PageRequest getPageRequest()
- Specified by:
getPageRequestin interfacePageResponse<T>- Returns:
- the request used to produce this response
-
-