Class EntityValidationRSQLVisitor

java.lang.Object
in.co.akshitbansal.springwebquery.ast.ValidationRSQLVisitor
in.co.akshitbansal.springwebquery.ast.EntityValidationRSQLVisitor
All Implemented Interfaces:
cz.jirutka.rsql.parser.ast.RSQLVisitor<Void,NodeMetadata>

public class EntityValidationRSQLVisitor extends ValidationRSQLVisitor
RSQL AST visitor that validates selectors directly against an entity model.

This visitor resolves request selectors to entity fields, applies any configured FieldMapping aliases, and ensures that the resolved terminal field is filterable for the requested operator.

It is typically used by entity-aware specification resolvers before converting a parsed RSQL tree into a Spring Data JPA Specification.

See Also:
  • Constructor Details

    • EntityValidationRSQLVisitor

      public EntityValidationRSQLVisitor(Class<?> entityClass, FieldMapping[] fieldMappings, Map<Class<?>,RSQLCustomOperator<?>> customOperators, boolean andNodeAllowed, boolean orNodeAllowed, int maxDepth)
      Creates a new entity validation visitor with the specified configuration.
      Parameters:
      entityClass - the entity class to validate against
      fieldMappings - array of field mappings (aliases) to consider
      customOperators - registered custom operators keyed by implementation class
      andNodeAllowed - whether logical AND operator is allowed
      orNodeAllowed - whether logical OR operator is allowed
      maxDepth - maximum allowed depth for the RSQL AST
  • Method Details