Class RSQLOperatorsAutoConfig

java.lang.Object
in.co.akshitbansal.springwebquery.config.RSQLOperatorsAutoConfig

@AutoConfiguration public class RSQLOperatorsAutoConfig extends Object
Registers validated default operators, custom operators, and the derived parser/predicate helper collections used by the starter.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    Set<? extends in.co.akshitbansal.springwebquery.operator.RSQLCustomOperator<?>>
    customOperatorSet(List<in.co.akshitbansal.springwebquery.operator.RSQLCustomOperator<?>> customOperatorBeans, Set<in.co.akshitbansal.springwebquery.operator.RSQLDefaultOperator> defaultOperatorSet)
    Collects user-defined custom operators and validates that none of their symbols overlap with each other or the built-in set.
    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 underlying rsql-jpa integration.
    Set<in.co.akshitbansal.springwebquery.operator.RSQLDefaultOperator>
    Collects the built-in RSQL operators supported by the library and validates that their symbols are unique.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.operator.RSQLCustomOperator<?>> customOperatorBeans, Set<in.co.akshitbansal.springwebquery.operator.RSQLDefaultOperator> defaultOperatorSet)
      Collects user-defined custom operators and validates that none of their symbols overlap with each other or the built-in set.
      Parameters:
      customOperatorBeans - custom operator beans discovered by Spring
      defaultOperatorSet - validated default operators
      Returns:
      immutable set of validated 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 operators
      customOperatorSet - 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 underlying rsql-jpa integration.
      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