Class UriToEntityConverter
java.lang.Object
org.springframework.data.rest.core.UriToEntityConverter
- All Implemented Interfaces:
GenericConverter
A
GenericConverter
that can convert a URI
into an entity.- Author:
- Jon Brisbin, Oliver Gierke
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.core.convert.converter.GenericConverter
GenericConverter.ConvertiblePair
-
Constructor Summary
ConstructorDescriptionUriToEntityConverter
(PersistentEntities entities, RepositoryInvokerFactory invokerFactory, Supplier<ConversionService> conversionService) Creates a newUriToEntityConverter
using the givenPersistentEntities
,RepositoryInvokerFactory
andRepositories
. -
Method Summary
Modifier and TypeMethodDescriptionconvert
(Object source, TypeDescriptor sourceType, TypeDescriptor targetType)
-
Constructor Details
-
UriToEntityConverter
public UriToEntityConverter(PersistentEntities entities, RepositoryInvokerFactory invokerFactory, Supplier<ConversionService> conversionService) Creates a newUriToEntityConverter
using the givenPersistentEntities
,RepositoryInvokerFactory
andRepositories
.- Parameters:
entities
- must not be null.invokerFactory
- must not be null.conversionService
- must not be null.
-
-
Method Details
-
getConvertibleTypes
- Specified by:
getConvertibleTypes
in interfaceGenericConverter
-
convert
@Nullable public Object convert(@Nullable Object source, TypeDescriptor sourceType, TypeDescriptor targetType) - Specified by:
convert
in interfaceGenericConverter
-