Class ValidationRSQLVisitorFactory

java.lang.Object
in.co.akshitbansal.springwebquery.ast.ValidationRSQLVisitorFactory

public class ValidationRSQLVisitorFactory extends Object
Factory for creating validation visitors with the shared resolver and filterability infrastructure used across specification resolvers.
  • Constructor Details

    • ValidationRSQLVisitorFactory

      public ValidationRSQLVisitorFactory()
  • Method Details

    • newDTOValidationRSQLVisitor

      public DTOValidationRSQLVisitor newDTOValidationRSQLVisitor(Class<?> entityClass, Class<?> dtoClass, boolean andNodeAllowed, boolean orNodeAllowed, int maxDepth)
      Creates a visitor that validates selectors against a DTO contract and records the resulting DTO-to-entity path mappings.
      Parameters:
      entityClass - backing entity type used for final path validation
      dtoClass - API-facing DTO type used for selector validation
      andNodeAllowed - whether logical AND nodes are permitted
      orNodeAllowed - whether logical OR nodes are permitted
      maxDepth - maximum allowed AST depth
      Returns:
      configured DTO-aware validation visitor
    • newEntityValidationRSQLVisitor

      public EntityValidationRSQLVisitor newEntityValidationRSQLVisitor(Class<?> entityClass, List<FieldMapping> fieldMappings, boolean andNodeAllowed, boolean orNodeAllowed, int maxDepth)
      Creates a visitor that validates selectors directly against the entity model, including any alias mappings declared on FieldMapping.
      Parameters:
      entityClass - backing entity type used for selector validation
      fieldMappings - entity-aware alias mappings declared for the endpoint
      andNodeAllowed - whether logical AND nodes are permitted
      orNodeAllowed - whether logical OR nodes are permitted
      maxDepth - maximum allowed AST depth
      Returns:
      configured entity-aware validation visitor