Package io.github.perplexhub.rsql
Class PathUtils
java.lang.Object
io.github.perplexhub.rsql.PathUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringexpectBestMapping(String path, Map<String, String> mapping) Try to find the best mapping for the property path by checking the whole path first, then the beginning, and finally the original path.findMappingOnBeginning(String path, Map<String, String> mapping) If the beginning of the property path is mapped, replace it with the mapped value.findMappingOnWhole(String path, Map<String, String> mapping) If the whole property path is mapped, replace it with the mapped value.
-
Method Details
-
findMappingOnBeginning
If the beginning of the property path is mapped, replace it with the mapped value.- Parameters:
path- the original property pathmapping- the property path mapper- Returns:
- the mapped property path
-
findMappingOnWhole
If the whole property path is mapped, replace it with the mapped value.- Parameters:
path- the original property pathmapping- the property path mapper- Returns:
- the mapped property path
-
expectBestMapping
Try to find the best mapping for the property path by checking the whole path first, then the beginning, and finally the original path.- Parameters:
path- the original property pathmapping- the property path mapper- Returns:
- the mapped property path
-