Class FactoryAutoConfig
java.lang.Object
in.co.akshitbansal.springwebquery.config.FactoryAutoConfig
Auto-configuration that wires the core factories used by query validation
and DTO/entity path translation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionin.co.akshitbansal.springwebquery.pathmapper.DTOToEntityPathMapperFactorydtoToEntityPathMapperFactoryWithCaching(int failedResolutionsMaxCapacity, int lockStripeCount) Creates the mapper factory variant that shares resolution caches across mapper instances.in.co.akshitbansal.springwebquery.pathmapper.DTOToEntityPathMapperFactoryCreates the mapper factory variant that performs no caching.in.co.akshitbansal.springwebquery.ast.ValidationRSQLVisitorFactoryvalidationRSQLVisitorFactory(in.co.akshitbansal.springwebquery.pathmapper.DTOToEntityPathMapperFactory pathMapperFactory, in.co.akshitbansal.springwebquery.validator.FilterableFieldValidator filterableFieldValidator) Creates the validation visitor factory used during RSQL parsing.
-
Constructor Details
-
FactoryAutoConfig
public FactoryAutoConfig()
-
-
Method Details
-
dtoToEntityPathMapperFactoryWithCaching
@Bean @ConditionalOnProperty(name="spring-web-query.field-resolution.caching.enabled", havingValue="true", matchIfMissing=true) @ConditionalOnMissingBean public in.co.akshitbansal.springwebquery.pathmapper.DTOToEntityPathMapperFactory dtoToEntityPathMapperFactoryWithCaching(@Value("${spring-web-query.field-resolution.caching.failed-resolutions-max-capacity:1000}") int failedResolutionsMaxCapacity, @Value("${spring-web-query.field-resolution.caching.lock-stripe-count:32}") int lockStripeCount) Creates the mapper factory variant that shares resolution caches across mapper instances.- Parameters:
failedResolutionsMaxCapacity- maximum cached failed resolutionslockStripeCount- number of striped locks used during cache fills- Returns:
- cached mapper factory
-
dtoToEntityPathMapperFactoryWithoutCaching
@Bean @ConditionalOnProperty(name="spring-web-query.field-resolution.caching.enabled", havingValue="false") @ConditionalOnMissingBean public in.co.akshitbansal.springwebquery.pathmapper.DTOToEntityPathMapperFactory dtoToEntityPathMapperFactoryWithoutCaching()Creates the mapper factory variant that performs no caching.- Returns:
- uncached mapper factory
-
validationRSQLVisitorFactory
@Bean @ConditionalOnMissingBean public in.co.akshitbansal.springwebquery.ast.ValidationRSQLVisitorFactory validationRSQLVisitorFactory(in.co.akshitbansal.springwebquery.pathmapper.DTOToEntityPathMapperFactory pathMapperFactory, in.co.akshitbansal.springwebquery.validator.FilterableFieldValidator filterableFieldValidator) Creates the validation visitor factory used during RSQL parsing.- Parameters:
pathMapperFactory- mapper factory used to resolve DTO selectorsfilterableFieldValidator- validator used for field-level filtering rules- Returns:
- validation visitor factory
-