public static class JacksonMappingAwareSortTranslator.SortTranslator extends Object
Sort
orders from Jackson-mapped field names to PersistentProperty
names.Constructor and Description |
---|
SortTranslator(org.springframework.data.mapping.context.PersistentEntities entities,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
Associations associations) |
Modifier and Type | Method and Description |
---|---|
org.springframework.data.domain.Sort |
translateSort(org.springframework.data.domain.Sort input,
org.springframework.data.mapping.PersistentEntity<?,?> rootEntity)
Translates
Sort orders from Jackson-mapped field names to PersistentProperty names. |
public SortTranslator(org.springframework.data.mapping.context.PersistentEntities entities, com.fasterxml.jackson.databind.ObjectMapper objectMapper, Associations associations)
public org.springframework.data.domain.Sort translateSort(org.springframework.data.domain.Sort input, org.springframework.data.mapping.PersistentEntity<?,?> rootEntity)
Sort
orders from Jackson-mapped field names to PersistentProperty
names. Properties
that cannot be resolved are dropped.input
- must not be null.rootEntity
- must not be null.Sort
with translated field names or null if translation dropped all sort fields.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.