Enum Class QueryOperator
java.lang.Object
java.lang.Enum<QueryOperator>
com.iqser.red.service.redaction.v1.server.model.component.QueryOperator
- All Implemented Interfaces:
Serializable
,Comparable<QueryOperator>
,Constable
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.
-
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 QueryOperator
fromString
(String name) Determines the operator from the query string.static QueryOperator
Returns the enum constant of this class with the specified name.static QueryOperator[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
EQUALS
-
CONTAINS
-
MATCHES
-
SOUNDSLIKE
-
INVALID
-
-
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
-
fromString
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
-