Class RSQLOperatorsAutoConfig
java.lang.Object
in.co.akshitbansal.springwebquery.config.RSQLOperatorsAutoConfig
Registers validated default operators, custom operators, and the derived
parser/predicate helper collections used by the starter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet<cz.jirutka.rsql.parser.ast.ComparisonOperator>allowedOperatorSet(Set<in.co.akshitbansal.springwebquery.operator.RSQLDefaultOperator> defaultOperatorSet, Set<? extends in.co.akshitbansal.springwebquery.operator.RSQLCustomOperator<?>> customOperatorSet) Builds the complete set of comparison operators accepted by the shared RSQL parser.customOperatorMap(Set<? extends in.co.akshitbansal.springwebquery.operator.RSQLCustomOperator<?>> customOperatorSet) Registers custom operators by implementation class for downstream validator lookups.Set<? extends in.co.akshitbansal.springwebquery.operator.RSQLCustomOperator<?>>customOperatorSet(List<in.co.akshitbansal.springwebquery.RSQLCustomOperatorsConfigurer> rsqlCustomOperatorsConfigurers, Set<in.co.akshitbansal.springwebquery.operator.RSQLDefaultOperator> defaultOperatorSet) Collects custom operators from all configuredRSQLCustomOperatorsConfigurerbeans and validates that their symbols do not conflict with each other or with the default operators.List<io.github.perplexhub.rsql.RSQLCustomPredicate<?>>customPredicates(Set<? extends in.co.akshitbansal.springwebquery.operator.RSQLCustomOperator<?>> customOperatorSet) Adapts registered custom operators into the predicate format expected by the underlyingrsql-jpaintegration.Set<in.co.akshitbansal.springwebquery.operator.RSQLDefaultOperator>Collects the built-in RSQL operators supported by the library and validates that their symbols are unique.
-
Constructor Details
-
RSQLOperatorsAutoConfig
public RSQLOperatorsAutoConfig()
-
-
Method Details
-
defaultOperatorSet
@Bean public Set<in.co.akshitbansal.springwebquery.operator.RSQLDefaultOperator> defaultOperatorSet()Collects the built-in RSQL operators supported by the library and validates that their symbols are unique.- Returns:
- immutable set of default operators
-
customOperatorSet
@Bean public Set<? extends in.co.akshitbansal.springwebquery.operator.RSQLCustomOperator<?>> customOperatorSet(List<in.co.akshitbansal.springwebquery.RSQLCustomOperatorsConfigurer> rsqlCustomOperatorsConfigurers, Set<in.co.akshitbansal.springwebquery.operator.RSQLDefaultOperator> defaultOperatorSet) Collects custom operators from all configuredRSQLCustomOperatorsConfigurerbeans and validates that their symbols do not conflict with each other or with the default operators.- Parameters:
rsqlCustomOperatorsConfigurers- custom operator contributorsdefaultOperatorSet- previously validated default operators- Returns:
- immutable set of registered custom operators
-
allowedOperatorSet
@Bean public Set<cz.jirutka.rsql.parser.ast.ComparisonOperator> allowedOperatorSet(Set<in.co.akshitbansal.springwebquery.operator.RSQLDefaultOperator> defaultOperatorSet, Set<? extends in.co.akshitbansal.springwebquery.operator.RSQLCustomOperator<?>> customOperatorSet) Builds the complete set of comparison operators accepted by the shared RSQL parser.- Parameters:
defaultOperatorSet- validated default operatorscustomOperatorSet- validated custom operators- Returns:
- immutable set of allowed comparison operators
-
customPredicates
@Bean public List<io.github.perplexhub.rsql.RSQLCustomPredicate<?>> customPredicates(Set<? extends in.co.akshitbansal.springwebquery.operator.RSQLCustomOperator<?>> customOperatorSet) Adapts registered custom operators into the predicate format expected by the underlyingrsql-jpaintegration.- Parameters:
customOperatorSet- validated custom operators- Returns:
- immutable list of custom predicates
-
customOperatorMap
@Bean public Map<Class<?>,in.co.akshitbansal.springwebquery.operator.RSQLCustomOperator<?>> customOperatorMap(Set<? extends in.co.akshitbansal.springwebquery.operator.RSQLCustomOperator<?>> customOperatorSet) Registers custom operators by implementation class for downstream validator lookups.- Parameters:
customOperatorSet- validated custom operators- Returns:
- immutable custom operator registry
-