Class EntityAwareFieldResolver
java.lang.Object
in.co.akshitbansal.springwebquery.resolver.EntityAwareFieldResolver
- All Implemented Interfaces:
FieldResolver
FieldResolver implementation that resolves selectors directly
against an entity model, with optional alias support via FieldMapping.
This resolver can rewrite request selectors using declared aliases, reject access to original field names when a mapping forbids them, and validate the resolved terminal entity field via the supplied callback.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolvePathAndValidateTerminalField(String reqFieldPath, Consumer<Field> terminalFieldValidator) Resolves an entity-facing selector path, validates the resolved terminal field, and returns the final entity path.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface in.co.akshitbansal.springwebquery.resolver.FieldResolver
resolvePath
-
Constructor Details
-
EntityAwareFieldResolver
public EntityAwareFieldResolver()
-
-
Method Details
-
resolvePathAndValidateTerminalField
public String resolvePathAndValidateTerminalField(String reqFieldPath, Consumer<Field> terminalFieldValidator) Resolves an entity-facing selector path, validates the resolved terminal field, and returns the final entity path.- Specified by:
resolvePathAndValidateTerminalFieldin interfaceFieldResolver- Parameters:
reqFieldPath- selector path from the incoming requestterminalFieldValidator- callback used to validate the resolved terminal field- Returns:
- resolved entity path after alias translation
-