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
ConstructorsConstructorDescriptionSortTranslator(PersistentEntities entities, com.fasterxml.jackson.databind.ObjectMapper objectMapper, Associations associations) -
Method Summary
Modifier and TypeMethodDescriptiontranslateSort(Sort input, PersistentEntity<?, ?> rootEntity) TranslatesSortorders from Jackson-mapped field names toPersistentPropertynames.
-
Constructor Details
-
SortTranslator
public SortTranslator(PersistentEntities entities, com.fasterxml.jackson.databind.ObjectMapper objectMapper, Associations associations)
-
-
Method Details
-
translateSort
TranslatesSortorders from Jackson-mapped field names toPersistentPropertynames. Properties that cannot be resolved are dropped.- Parameters:
input- must not be null.rootEntity- must not be null.- Returns:
Sortwith translated field names or null if translation dropped all sort fields.
-