Class Jackson2MappingAwareSortTranslator
java.lang.Object
org.springframework.data.rest.webmvc.json.Jackson2MappingAwareSortTranslator
- All Implemented Interfaces:
SortTranslator
@Deprecated(since="5.0",
forRemoval=true)
public class Jackson2MappingAwareSortTranslator
extends Object
implements SortTranslator
Deprecated, for removal: This API element is subject to removal in a future version.
Translator for
Sort arguments that is aware of Jackson-Mapping on domain classes. Jackson field names are
translated to PersistentProperty names. Domain class is looked up by resolving request URLs to mapped
repositories. Sort translation is skipped if a domain class cannot be resolved.- Since:
- 2.6
- Author:
- Mark Paluch, Oliver Gierke
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version.TranslatesSortorders from Jackson-mapped field names toPersistentPropertynames. -
Constructor Summary
ConstructorsConstructorDescriptionJackson2MappingAwareSortTranslator(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Repositories repositories, DomainClassResolver domainClassResolver, PersistentEntities persistentEntities, Associations associations) Deprecated, for removal: This API element is subject to removal in a future version.Creates a newJackson2MappingAwareSortTranslatorfor the givenObjectMapper,Repositories,DomainClassResolverandPersistentEntities. -
Method Summary
Modifier and TypeMethodDescriptiontranslateSort(Sort input, MethodParameter parameter, NativeWebRequest webRequest) Deprecated, for removal: This API element is subject to removal in a future version.Translates Jackson field names within aSorttoPersistentPropertyproperty names.
-
Constructor Details
-
Jackson2MappingAwareSortTranslator
public Jackson2MappingAwareSortTranslator(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Repositories repositories, DomainClassResolver domainClassResolver, PersistentEntities persistentEntities, Associations associations) Deprecated, for removal: This API element is subject to removal in a future version.Creates a newJackson2MappingAwareSortTranslatorfor the givenObjectMapper,Repositories,DomainClassResolverandPersistentEntities.- Parameters:
objectMapper- must not be null.repositories- must not be null.domainClassResolver- must not be null.persistentEntities- must not be null.associations- must not be null.
-
-
Method Details
-
translateSort
Deprecated, for removal: This API element is subject to removal in a future version.Translates Jackson field names within aSorttoPersistentPropertyproperty names.- Specified by:
translateSortin interfaceSortTranslator- Parameters:
input- must not be null.parameter- must not be null.webRequest- must not be null.- Returns:
- a
Sortcontaining translated property names or null the resultingSortcontains no properties.
-
JacksonMappingAwareSortTranslator