Class JsonKeysetCursorStrategy
java.lang.Object
org.springframework.graphql.data.query.JsonKeysetCursorStrategy
- All Implemented Interfaces:
- CursorStrategy<Map<String,- Object>> 
public final class JsonKeysetCursorStrategy
extends Object
implements CursorStrategy<Map<String,Object>> 
Strategy to convert a 
keyset to and
 from a JSON String for use with ScrollPositionCursorStrategy.- Since:
- 1.2.0
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructorsConstructorDescriptionShortcut constructor that usesServerCodecConfigurer.JsonKeysetCursorStrategy(CodecConfigurer codecConfigurer) Constructor with aCodecConfigurerin which to find the JSON encoder and decoder to use.
- 
Method SummaryModifier and TypeMethodDescriptionfromCursor(String cursor) Parse the given String cursor into a position Object.booleanWhether the strategy supports the given type of position Object.Format the given position Object as a String cursor.
- 
Constructor Details- 
JsonKeysetCursorStrategypublic JsonKeysetCursorStrategy()Shortcut constructor that usesServerCodecConfigurer.
- 
JsonKeysetCursorStrategyConstructor with aCodecConfigurerin which to find the JSON encoder and decoder to use.- Parameters:
- codecConfigurer- the codec configurer to be checked for JSON codec
 
 
- 
- 
Method Details- 
supportsDescription copied from interface:CursorStrategyWhether the strategy supports the given type of position Object.- Specified by:
- supportsin interface- CursorStrategy<Map<String,- Object>> 
- Parameters:
- targetType- the type of position to be checked
 
- 
toCursorDescription copied from interface:CursorStrategyFormat the given position Object as a String cursor.- Specified by:
- toCursorin interface- CursorStrategy<Map<String,- Object>> 
- Parameters:
- keys- the position to serialize
- Returns:
- the created String cursor
 
- 
fromCursorDescription copied from interface:CursorStrategyParse the given String cursor into a position Object.- Specified by:
- fromCursorin interface- CursorStrategy<Map<String,- Object>> 
- Parameters:
- cursor- the cursor to parse
- Returns:
- the position Object
 
 
-