Class CompositeConnectionAdapter
java.lang.Object
org.springframework.graphql.data.pagination.CompositeConnectionAdapter
- All Implemented Interfaces:
ConnectionAdapter
ConnectionAdapter that wraps a list of other adapters, and delegates
to the one that supports a given type of Object container.- Since:
- 1.2.0
- Author:
- Rossen Stoyanchev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn a cursor for the item at the given index.<T> Collection<T> getContent(Object container) Return the contained items as a List.booleanWhether there are more pages after this one.booleanhasPrevious(Object container) Whether there are more pages before this one.booleanWhether the adapter supports the given Object container type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.graphql.data.pagination.ConnectionAdapter
createConnection
-
Constructor Details
-
CompositeConnectionAdapter
-
-
Method Details
-
supports
Description copied from interface:ConnectionAdapterWhether the adapter supports the given Object container type.- Specified by:
supportsin interfaceConnectionAdapter- Parameters:
containerType- the container type to check for support
-
getContent
Description copied from interface:ConnectionAdapterReturn the contained items as a List.- Specified by:
getContentin interfaceConnectionAdapter- Type Parameters:
T- the type of objects in the collection- Parameters:
container- the container of elements
-
hasPrevious
Description copied from interface:ConnectionAdapterWhether there are more pages before this one.- Specified by:
hasPreviousin interfaceConnectionAdapter- Parameters:
container- the container of elements
-
hasNext
Description copied from interface:ConnectionAdapterWhether there are more pages after this one.- Specified by:
hasNextin interfaceConnectionAdapter- Parameters:
container- the container of elements
-
cursorAt
Description copied from interface:ConnectionAdapterReturn a cursor for the item at the given index.- Specified by:
cursorAtin interfaceConnectionAdapter- Parameters:
container- the container of elementsindex- the index of an element in the container
-