Class FilterAndSortAliasUtil
java.lang.Object
com.broadleafcommerce.data.tracking.core.mapping.FilterAndSortAliasUtil
Utilities for processing
FilterAndSortAlias
- Author:
- Phillip Verheyden (phillipuniverse)
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
transformField
(String aliasedPath, Class<?> clazz) Transforms a given field to its real domain class representation based onFilterAndSortAlias
annotations.
-
Method Details
-
transformField
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 <alias
- 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
-