Enum Class RsqlOperator
- All Implemented Interfaces:
Serializable,Comparable<RsqlOperator>,Constable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic RsqlOperatorReturns the enum constant of this class with the specified name.static RsqlOperator[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EQUAL
-
NOT_EQUAL
-
GREATER_THAN
-
GREATER_THAN_OR_EQUAL
-
LESS_THAN
-
LESS_THAN_OR_EQUAL
-
IN
-
NOT_IN
-
IS_NULL
-
NOT_NULL
-
LIKE
-
NOT_LIKE
-
IGNORE_CASE
-
IGNORE_CASE_LIKE
-
IGNORE_CASE_NOT_LIKE
-
BETWEEN
-
NOT_BETWEEN
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-