java.lang.Object
java.lang.Enum<QueryOperator>
com.iqser.red.service.redaction.v1.server.model.component.QueryOperator
All Implemented Interfaces:
Serializable, Comparable<QueryOperator>, Constable

public enum QueryOperator extends Enum<QueryOperator>
Enum describing the different types of allowed queries.

EQUALS requires the query to match exactly,

CONTAINS requires the query to partially match the field.

MATCHES assumes the query to be a regular expression and requires the string to match the regex.

SOUNDSLIKE requires the query to match the field with SOUNDEX based matching.

INVALID never matches.

  • Enum Constant Details

  • Method Details

    • values

      public static QueryOperator[] 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 QueryOperator 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
    • fromString

      public static QueryOperator fromString(String name)
      Determines the operator from the query string. Its case-insensitive.

      "=", "equals" -> EQUALS

      "contains" -> CONTAINS

      "matches" -> MATCHES

      "soundslike" -> SOUNDSLIKE

      if none of the above options matches an INVALID operator will be returned

      Parameters:
      name - String naming the operator
      Returns:
      the operator parsed from the name