Class JacksonMappingAwareSortTranslator.SortTranslator
java.lang.Object
org.springframework.data.rest.webmvc.json.JacksonMappingAwareSortTranslator.SortTranslator
- Enclosing class:
- JacksonMappingAwareSortTranslator
Translates
Sort
orders from Jackson-mapped field names to PersistentProperty
names.- Since:
- 2.6
- Author:
- Mark Paluch, Oliver Gierke
-
Constructor Summary
ConstructorDescriptionSortTranslator
(PersistentEntities entities, com.fasterxml.jackson.databind.ObjectMapper objectMapper, Associations associations) -
Method Summary
Modifier and TypeMethodDescriptiontranslateSort
(Sort input, PersistentEntity<?, ?> rootEntity) TranslatesSort
orders from Jackson-mapped field names toPersistentProperty
names.
-
Constructor Details
-
SortTranslator
public SortTranslator(PersistentEntities entities, com.fasterxml.jackson.databind.ObjectMapper objectMapper, Associations associations)
-
-
Method Details
-
translateSort
TranslatesSort
orders from Jackson-mapped field names toPersistentProperty
names. Properties that cannot be resolved are dropped.- Parameters:
input
- must not be null.rootEntity
- must not be null.- Returns:
Sort
with translated field names or null if translation dropped all sort fields.
-