org.keycloak.models.map.storage

## Enum ModelCriteriaBuilder.Operator

- java.lang.Object
- - java.lang.Enum<ModelCriteriaBuilder.Operator>
  - - org.keycloak.models.map.storage.ModelCriteriaBuilder.Operator

- All Implemented Interfaces:
    Serializable, Comparable<ModelCriteriaBuilder.Operator>
  Enclosing interface:
    ModelCriteriaBuilder<M>

      public static enum ModelCriteriaBuilder.Operator
      extends Enum<ModelCriteriaBuilder.Operator>

  The operators are very basic ones for this use case. In the real scenario, new operators can be added, possibly with different arity, e.g. `IN`. The `ModelCriteriaBuilder.compare(org.keycloak.storage.SearchableModelField<M>, org.keycloak.models.map.storage.ModelCriteriaBuilder.Operator, java.lang.Object...)` method would need an adjustment then, likely to taky vararg `value` instead of single value as it is now.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `EQ` Equals to
    `EXISTS` Is not null
    `GE` Greater than or equal
    `GT` Greater than
    `ILIKE` Similar to SQL case-insensitive LIKE.
    `IN` Operator for belonging into a collection of values.
    `LE` Less than or equal
    `LIKE` Similar to SQL case-sensitive LIKE Whole string is matched.
    `LT` Less than
    `NE` Not equals to
    `NOT_EXISTS` Is null

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ModelCriteriaBuilder.Operator` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static ModelCriteriaBuilder.Operator[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### EQ

          public static final ModelCriteriaBuilder.Operator EQ

      Equals to

    - #### NE

          public static final ModelCriteriaBuilder.Operator NE

      Not equals to

    - #### LT

          public static final ModelCriteriaBuilder.Operator LT

      Less than

    - #### LE

          public static final ModelCriteriaBuilder.Operator LE

      Less than or equal

    - #### GT

          public static final ModelCriteriaBuilder.Operator GT

      Greater than

    - #### GE

          public static final ModelCriteriaBuilder.Operator GE

      Greater than or equal

    - #### LIKE

          public static final ModelCriteriaBuilder.Operator LIKE

      Similar to SQL case-sensitive LIKE Whole string is matched. Percent sign means "any characters", question mark means "any single character":
      - `field LIKE "abc"` means value of the field `field` must match exactly `abc`
      - `field LIKE "abc%"` means value of the field `field` must start with `abc`
      - `field LIKE "%abc"` means value of the field `field` must end with `abc`
      - `field LIKE "%abc%"` means value of the field `field` must contain `abc`

    - #### ILIKE

          public static final ModelCriteriaBuilder.Operator ILIKE

      Similar to SQL case-insensitive LIKE. Whole string is matched. Percent sign means "any characters", question mark means "any single character":
      - `field ILIKE "abc"` means value of the field `field` must match exactly `abc`, `ABC`, `aBc` etc.
      - `field ILIKE "abc%"` means value of the field `field` must start with `abc`, `ABC`, `aBc` etc.
      - `field ILIKE "%abc"` means value of the field `field` must end with `abc`, `ABC`, `aBc` etc.
      - `field ILIKE "%abc%"` means value of the field `field` must contain `abc`, `ABC`, `aBc` etc.

    - #### IN

          public static final ModelCriteriaBuilder.Operator IN

      Operator for belonging into a collection of values. Operand in `value` can be an array (via an implicit conversion of the vararg), a `Collection` or a `Stream`.

    - #### EXISTS

          public static final ModelCriteriaBuilder.Operator EXISTS

      Is not null

    - #### NOT_EXISTS

          public static final ModelCriteriaBuilder.Operator NOT_EXISTS

      Is null

  - ### Method Detail

    - #### values

          public static ModelCriteriaBuilder.Operator[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (ModelCriteriaBuilder.Operator c : ModelCriteriaBuilder.Operator.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static ModelCriteriaBuilder.Operator valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        `NullPointerException` - if the argument is null

Copyright © 2021 JBoss by Red Hat. All rights reserved.