Class DTOAwareFieldResolver
java.lang.Object
in.co.akshitbansal.springwebquery.resolver.field.DTOAwareFieldResolver
- All Implemented Interfaces:
FieldResolver
- Direct Known Subclasses:
CachedDTOAwareFieldResolver
FieldResolver implementation that treats a DTO type as the public
query contract and maps DTO selector paths to entity selector paths.
Resolution proceeds in three steps:
- Resolve the incoming path against the DTO class structure.
- Translate the DTO path to an entity path using
MapsTo, then verify that the resulting entity path exists. - Return the mapped entity path together with the terminal DTO field so callers can apply validation separately.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolvePath(@NonNull String dtoPath) Resolves a DTO selector path and maps the selector to the corresponding entity path.
-
Field Details
-
entityClass
Entity type used to validate the translated path. -
dtoClass
DTO type used as the external selector contract.
-
-
Constructor Details
-
DTOAwareFieldResolver
public DTOAwareFieldResolver()
-
-
Method Details
-
resolvePath
Resolves a DTO selector path and maps the selector to the corresponding entity path.- Specified by:
resolvePathin interfaceFieldResolver- Parameters:
dtoPath- selector path from the incoming request- Returns:
- resolution result containing the mapped entity path and terminal DTO field
-