Class ValidationRSQLVisitorFactory
java.lang.Object
in.co.akshitbansal.springwebquery.ast.ValidationRSQLVisitorFactory
Factory for creating validation visitors with the shared resolver and
filterability infrastructure used across specification resolvers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewDTOValidationRSQLVisitor(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.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 onFieldMapping.
-
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 validationdtoClass- API-facing DTO type used for selector validationandNodeAllowed- whether logical AND nodes are permittedorNodeAllowed- whether logical OR nodes are permittedmaxDepth- 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 onFieldMapping.- Parameters:
entityClass- backing entity type used for selector validationfieldMappings- entity-aware alias mappings declared for the endpointandNodeAllowed- whether logical AND nodes are permittedorNodeAllowed- whether logical OR nodes are permittedmaxDepth- maximum allowed AST depth- Returns:
- configured entity-aware validation visitor
-