Enum Class RsqlOperator

java.lang.Object
java.lang.Enum<RsqlOperator>
in.co.akshitbansal.springwebquery.operator.RsqlOperator
All Implemented Interfaces:
Serializable, Comparable<RsqlOperator>, Constable

public enum RsqlOperator extends Enum<RsqlOperator>
Enumeration of supported RSQL comparison operators.

This enum provides a type-safe wrapper around the built-in RSQLOperators supplied by the RSQL library. Each enum constant maps directly to a corresponding ComparisonOperator instance and represents a single logical comparison operation supported by RSQL.

The primary purpose of this enum is to:

  • Expose RSQL operators in a form that can be safely used in Java annotations
  • Allow fine-grained control over which operators are permitted for a given entity field
  • Decouple application code from direct usage of RSQLOperators

RsqlOperator is typically used in conjunction with RsqlFilterable to declare the set of allowed operators on an entity field, and with ValidationRSQLVisitor to enforce these constraints at runtime.

Example usage:


 @RsqlFilterable(operators = {RsqlOperator.EQUAL, RsqlOperator.IN})
 private String status;
 
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static RsqlOperator[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RsqlOperator valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null