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.

@FunctionalInterface public interface FieldResolver
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 Type
    Method
    Description
    default String
    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

      String 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.
      Parameters:
      path - selector path from the incoming request
      terminalFieldValidator - callback used to validate the resolved terminal field
      Returns:
      resolved path suitable for entity-backed query execution
    • resolvePath

      default String resolvePath(String path)
      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