Class UriToEntityConverter
java.lang.Object
org.springframework.data.rest.core.UriToEntityConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.ConditionalConverter
,org.springframework.core.convert.converter.ConditionalGenericConverter
,org.springframework.core.convert.converter.GenericConverter
public class UriToEntityConverter
extends Object
implements org.springframework.core.convert.converter.ConditionalGenericConverter
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
org.springframework.core.convert.converter.GenericConverter.ConvertiblePair
-
Constructor Summary
ConstructorDescriptionUriToEntityConverter
(org.springframework.data.mapping.context.PersistentEntities entities, org.springframework.data.repository.support.RepositoryInvokerFactory invokerFactory, org.springframework.data.repository.support.Repositories repositories) Creates a newUriToEntityConverter
using the givenPersistentEntities
,RepositoryInvokerFactory
andRepositories
. -
Method Summary
Modifier and TypeMethodDescriptionconvert
(Object source, org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType) Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair>
boolean
matches
(org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)
-
Constructor Details
-
UriToEntityConverter
public UriToEntityConverter(org.springframework.data.mapping.context.PersistentEntities entities, org.springframework.data.repository.support.RepositoryInvokerFactory invokerFactory, org.springframework.data.repository.support.Repositories repositories) Creates a newUriToEntityConverter
using the givenPersistentEntities
,RepositoryInvokerFactory
andRepositories
.- Parameters:
entities
- must not be null.invokerFactory
- must not be null.repositories
- must not be null.
-
-
Method Details
-
matches
public boolean matches(org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType) - Specified by:
matches
in interfaceorg.springframework.core.convert.converter.ConditionalConverter
-
getConvertibleTypes
public Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> getConvertibleTypes()- Specified by:
getConvertibleTypes
in interfaceorg.springframework.core.convert.converter.GenericConverter
-
convert
public Object convert(Object source, org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType) - Specified by:
convert
in interfaceorg.springframework.core.convert.converter.GenericConverter
-