Class FilterAndSortAliasUtil
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.core.mapping.FilterAndSortAliasUtil
-
public final class FilterAndSortAliasUtil extends Object
Utilities for processingFilterAndSortAlias
- Author:
- Phillip Verheyden (phillipuniverse)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
transformField(String aliasedPath, Class<?> clazz)
Transforms a given field to its real domain class representation based onFilterAndSortAlias
annotations.
-
-
-
Method Detail
-
transformField
@Nullable public static String transformField(@Nullable String aliasedPath, Class<?> clazz)
Transforms a given field to its real domain class representation based on
FilterAndSortAlias
annotations. This supports nested properties and can resolve aliases down through a class relationship tree.This makes a best effort to transform the given fields, but will simply stop at transformation if there are fields within
- Parameters:
aliasedPath
- a field from the class that could be annotated, can be nullclazz
- the class to map fields onto, that could be annotated withFilterAndSortAlias
- Returns:
- the transformed path corresponding to real field names on clazz. If fields are unaliased or do not appear on clazz, then no transformation is made. This only returns null if aliasedPath was null
-
-