Class SliceConnectionAdapter
java.lang.Object
org.springframework.graphql.data.pagination.ConnectionAdapterSupport<org.springframework.data.domain.ScrollPosition>
org.springframework.graphql.data.query.SliceConnectionAdapter
- All Implemented Interfaces:
- ConnectionAdapter
public final class SliceConnectionAdapter
extends ConnectionAdapterSupport<org.springframework.data.domain.ScrollPosition>
implements ConnectionAdapter
Adapter for 
Slice to Connection.- Since:
- 1.2.0
- Author:
- Rossen Stoyanchev, Oliver Drotbohm
- 
Constructor SummaryConstructorsConstructorDescriptionSliceConnectionAdapter(CursorStrategy<org.springframework.data.domain.ScrollPosition> strategy) Constructor with theCursorStrategyto use to encode theScrollPositionof page items.
- 
Method SummaryModifier 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 org.springframework.graphql.data.pagination.ConnectionAdapterSupportgetCursorStrategy
- 
Constructor Details- 
SliceConnectionAdapterpublic SliceConnectionAdapter(CursorStrategy<org.springframework.data.domain.ScrollPosition> strategy) Constructor with theCursorStrategyto use to encode theScrollPositionof page items.- Parameters:
- strategy- the cursor strategy to use
 
 
- 
- 
Method Details- 
supportsDescription copied from interface:ConnectionAdapterWhether the adapter supports the given Object container type.- Specified by:
- supportsin interface- ConnectionAdapter
- Parameters:
- containerType- the container type to check for support
 
- 
getContentDescription copied from interface:ConnectionAdapterReturn the contained items as a List.- Specified by:
- getContentin interface- ConnectionAdapter
- Type Parameters:
- T- the type of objects in the collection
- Parameters:
- container- the container of elements
 
- 
hasPreviousDescription copied from interface:ConnectionAdapterWhether there are more pages before this one.- Specified by:
- hasPreviousin interface- ConnectionAdapter
- Parameters:
- container- the container of elements
 
- 
hasNextDescription copied from interface:ConnectionAdapterWhether there are more pages after this one.- Specified by:
- hasNextin interface- ConnectionAdapter
- Parameters:
- container- the container of elements
 
- 
cursorAtDescription copied from interface:ConnectionAdapterReturn a cursor for the item at the given index.- Specified by:
- cursorAtin interface- ConnectionAdapter
- Parameters:
- container- the container of elements
- index- the index of an element in the container
 
 
-