Interface FieldResolver
- All Known Implementing Classes:
DTOAwareFieldResolver,EntityAwareFieldResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy for resolving API-facing selector paths into concrete entity paths.
Implementations encapsulate the path-resolution rules for a particular query contract, such as direct entity-field access or DTO-to-entity mapping. They also expose a hook for validating the resolved terminal field before the final path is returned to the caller.
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringresolvePath(String path) Resolves the supplied selector path without performing terminal-field validation.resolvePathAndValidateTerminalField(String path, Consumer<Field> terminalFieldValidator) Resolves the supplied selector path, validates the resolved terminal field, and returns the corresponding path understood by downstream query builders.
-
Method Details
-
resolvePathAndValidateTerminalField
Resolves the supplied selector path, validates the resolved terminal field, and returns the corresponding path understood by downstream query builders.- Parameters:
path- selector path from the incoming requestterminalFieldValidator- callback used to validate the resolved terminal field- Returns:
- resolved path suitable for entity-backed query execution
-
resolvePath
Resolves the supplied selector path without performing terminal-field validation.- Parameters:
path- selector path from the incoming request- Returns:
- resolved path suitable for entity-backed query execution
-