Interface ClientResponseField
- All Superinterfaces:
- ResponseField
Extends 
ResponseField to add options for decoding the field value.- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
- 
Method SummaryModifier and TypeMethodDescription<D> @Nullable DDecode the field to an entity of the given type.<D> @Nullable 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 oftoEntity(Class)to decode to a list of entities.Methods inherited from interface org.springframework.graphql.ResponseFieldgetErrors, getParsedPath, getPath, getValue
- 
Method Details- 
toEntityDecode the field to an entity of the given type.- Type Parameters:
- D- the entity type
- Parameters:
- entityType- the type to convert to
- Returns:
- the decoded entity, or nullif the field isnullbut otherwise there are no errors
- Throws:
- FieldAccessException- if the target field is- nulland the response is not- validor the field has- errors.
 
- 
toEntityVariant oftoEntity(Class)with aParameterizedTypeReference.- Type Parameters:
- D- the entity type
- Parameters:
- entityType- the type to convert to
 
- 
toEntityListVariant oftoEntity(Class)to decode to a list of entities.- Type Parameters:
- D- the entity type
- Parameters:
- elementType- the type of elements in the list
- Returns:
- the list of decoded entities, or an empty list if the field is
 nullbut otherwise there are no errors
- Throws:
- FieldAccessException- if the target field is- nulland the response is not- validor the field has- errors.
 
- 
toEntityListVariant oftoEntity(Class)to decode to a list of entities.- Type Parameters:
- D- the entity type
- Parameters:
- elementType- the type of elements in the list
- Returns:
- the list of decoded entities, or an empty list if the field is
 nullbut otherwise there are no errors
- Throws:
- FieldAccessException- if the target field is- nulland the response is not- validor the field has- errors.
 
 
-