public class JacksonMappingAwareSortTranslator extends Object
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.| Modifier and Type | Class and Description |
|---|---|
static class |
JacksonMappingAwareSortTranslator.SortTranslator
Translates
Sort orders from Jackson-mapped field names to PersistentProperty names. |
| Constructor and Description |
|---|
JacksonMappingAwareSortTranslator(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
Repositories repositories,
DomainClassResolver domainClassResolver,
PersistentEntities persistentEntities,
Associations associations)
Creates a new
JacksonMappingAwareSortTranslator for the given ObjectMapper, Repositories,
DomainClassResolver and PersistentEntities. |
| Modifier and Type | Method and Description |
|---|---|
protected Sort |
translateSort(Sort input,
MethodParameter parameter,
NativeWebRequest webRequest)
Translates Jackson field names within a
Sort to PersistentProperty property names. |
public JacksonMappingAwareSortTranslator(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
Repositories repositories,
DomainClassResolver domainClassResolver,
PersistentEntities persistentEntities,
Associations associations)
JacksonMappingAwareSortTranslator for the given ObjectMapper, Repositories,
DomainClassResolver and PersistentEntities.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.protected Sort translateSort(Sort input, MethodParameter parameter, NativeWebRequest webRequest)
Sort to PersistentProperty property names.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.