Interface GraphQlClient.RetrieveSyncSpec
- Enclosing interface:
 GraphQlClient
public static interface GraphQlClient.RetrieveSyncSpec
Declares options to decode a field in a single response.
- Since:
 - 1.0.0
 - Author:
 - Rossen Stoyanchev
 
- 
Method Summary
Modifier and TypeMethodDescription<D> DDecode the field to an entity of the given type.<D> DtoEntity(ParameterizedTypeReference<D> entityType) Variant oftoEntity(Class)with aParameterizedTypeReference.<D> List<D> toEntityList(Class<D> elementType) Variant oftoEntity(Class)to decode to a List of entities.<D> List<D> toEntityList(ParameterizedTypeReference<D> elementType) Variant oftoEntityList(Class)with aParameterizedTypeReference. 
- 
Method Details
- 
toEntity
Decode the field to an entity of the given type.- Type Parameters:
 D- the type to convert to- Parameters:
 entityType- the type to convert to- Returns:
 - the entity or null if the field is 
nulland has no errors. - Throws:
 FieldAccessException- in case offield errorsor aninvalidresponse;- See Also:
 
 - 
toEntity
Variant oftoEntity(Class)with aParameterizedTypeReference.- Type Parameters:
 D- the type to convert to- Parameters:
 entityType- the type to convert to
 - 
toEntityList
Variant oftoEntity(Class)to decode to a List of entities.- Type Parameters:
 D- the type to convert to- Parameters:
 elementType- the type of elements in the list
 - 
toEntityList
Variant oftoEntityList(Class)with aParameterizedTypeReference.- Type Parameters:
 D- the type to convert to- Parameters:
 elementType- the type of elements in the list
 
 -