Class FactoryAutoConfig
java.lang.Object
in.co.akshitbansal.springwebquery.config.FactoryAutoConfig
Publishes shared infrastructure beans used by the starter's query resolvers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionin.co.akshitbansal.springwebquery.resolver.field.cache.DTOAwareFieldResolutionCachedtoAwareFieldResolutionCache(in.co.akshitbansal.springwebquery.SpringWebQueryProperties properties) Creates the shared cache used by DTO-aware field resolvers when caching is enabled.in.co.akshitbansal.springwebquery.resolver.field.FieldResolverFactoryfieldResolverFactoryWithDTOCache(in.co.akshitbansal.springwebquery.resolver.field.cache.DTOAwareFieldResolutionCache cache) Creates the shared field-resolver factory backed by the DTO-resolution cache.in.co.akshitbansal.springwebquery.resolver.field.FieldResolverFactoryCreates the shared factory for field resolver instances when caching is not enabled.in.co.akshitbansal.springwebquery.ast.ValidationRSQLVisitorFactoryvalidationRSQLVisitorFactory(in.co.akshitbansal.springwebquery.resolver.field.FieldResolverFactory fieldResolverFactory, in.co.akshitbansal.springwebquery.validator.FilterableFieldValidator filterableFieldValidator) Creates the shared factory for validation visitors used during RSQL specification resolution.
-
Constructor Details
-
FactoryAutoConfig
public FactoryAutoConfig()
-
-
Method Details
-
dtoAwareFieldResolutionCache
@Bean @ConditionalOnProperty(name="spring-web-query.field-resolution.dto-aware.caching.enabled", havingValue="true", matchIfMissing=true) @ConditionalOnMissingBean public in.co.akshitbansal.springwebquery.resolver.field.cache.DTOAwareFieldResolutionCache dtoAwareFieldResolutionCache(in.co.akshitbansal.springwebquery.SpringWebQueryProperties properties) Creates the shared cache used by DTO-aware field resolvers when caching is enabled.- Parameters:
properties- validated global starter properties- Returns:
- DTO-aware field-resolution cache
-
fieldResolverFactoryWithDTOCache
@Bean @ConditionalOnBean(in.co.akshitbansal.springwebquery.resolver.field.cache.DTOAwareFieldResolutionCache.class) @ConditionalOnMissingBean public in.co.akshitbansal.springwebquery.resolver.field.FieldResolverFactory fieldResolverFactoryWithDTOCache(in.co.akshitbansal.springwebquery.resolver.field.cache.DTOAwareFieldResolutionCache cache) Creates the shared field-resolver factory backed by the DTO-resolution cache.- Parameters:
cache- cache for memoizing DTO-aware field-resolution results- Returns:
- field-resolver factory that produces cached DTO-aware resolvers
-
fieldResolverFactoryWithoutDTOCache
@Bean @ConditionalOnMissingBean public in.co.akshitbansal.springwebquery.resolver.field.FieldResolverFactory fieldResolverFactoryWithoutDTOCache()Creates the shared factory for field resolver instances when caching is not enabled.- Returns:
- field resolver factory
-
validationRSQLVisitorFactory
@Bean @ConditionalOnMissingBean public in.co.akshitbansal.springwebquery.ast.ValidationRSQLVisitorFactory validationRSQLVisitorFactory(in.co.akshitbansal.springwebquery.resolver.field.FieldResolverFactory fieldResolverFactory, in.co.akshitbansal.springwebquery.validator.FilterableFieldValidator filterableFieldValidator) Creates the shared factory for validation visitors used during RSQL specification resolution.- Parameters:
fieldResolverFactory- factory for DTO-aware and entity-aware field resolversfilterableFieldValidator- validator used for terminal field/operator checks- Returns:
- validation visitor factory
-