Package org.apache.torque.criteria

## Class SqlEnum

- java.lang.Object
- - org.apache.torque.criteria.SqlEnum

- All Implemented Interfaces:
    `Serializable`

      public final class SqlEnum
      extends Object
      implements Serializable

  A typesafe enum of SQL string fragments. Used by Criteria and SqlExpression to build queries. Criteria also makes most of the constants available in order to specify a criterion.
  Since:
    3.0
  Version:
    $Id: SqlEnum.java 1850965 2019-01-10 17:21:29Z painter $
  Author:
    , Thomas Fischer
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static SqlEnum` | `ALL` | SQL Expression "ALL ".
    `static SqlEnum` | `ALT_NOT_EQUAL` | SQL Expression "!
    `static SqlEnum` | `AS` | SQL Expression " AS ".
    `static SqlEnum` | `ASC` | SQL Expression "ASC".
    `static SqlEnum` | `CURRENT_DATE` | SQL Expression "CURRENT_DATE".
    `static SqlEnum` | `CURRENT_TIME` | SQL Expression "CURRENT_TIME".
    `static SqlEnum` | `CURRENT_TIMESTAMP` | SQL Expression "CURRENT_TIMESTAMP".
    `static SqlEnum` | `DESC` | SQL Expression "DESC".
    `static SqlEnum` | `DISTINCT` | SQL Expression "DISTINCT ".
    `static SqlEnum` | `EQUAL` | SQL Expression "=".
    `static SqlEnum` | `ESCAPE` | SQL Expression " ESCAPE ".
    `static SqlEnum` | `EXCEPT` | SQL Expression " EXCEPT ".
    `static SqlEnum` | `EXCEPT_ALL` | SQL Expression " EXCEPT ALL ".
    `static SqlEnum` | `GREATER_EQUAL` | SQL Expression ">=".
    `static SqlEnum` | `GREATER_THAN` | SQL Expression ">".
    `static SqlEnum` | `ILIKE` | SQL Expression " ILIKE ".
    `static SqlEnum` | `IN` | SQL Expression " IN ".
    `static SqlEnum` | `INTERSECT` | SQL Expression " INTERSECT ".
    `static SqlEnum` | `INTERSECT_ALL` | SQL Expression " INTERSECT ALL ".
    `static SqlEnum` | `ISNOTNULL` | SQL Expression " IS NOT NULL".
    `static SqlEnum` | `ISNULL` | SQL Expression " IS NULL".
    `static SqlEnum` | `JOIN` | SQL Expression "JOIN".
    `static SqlEnum` | `LESS_EQUAL` | SQL Expression "<=".
    `static SqlEnum` | `LESS_THAN` | SQL Expression "<".
    `static SqlEnum` | `LIKE` | SQL Expression " LIKE ".
    `static SqlEnum` | `MINUS` | SQL Expression " MINUS ".
    `static SqlEnum` | `MINUS_ALL` | SQL Expression " MINUS ALL ".
    `static SqlEnum` | `NOT_EQUAL` | SQL Expression "<>".
    `static SqlEnum` | `NOT_ILIKE` | SQL Expression " NOT ILIKE ".
    `static SqlEnum` | `NOT_IN` | SQL Expression " NOT IN ".
    `static SqlEnum` | `NOT_LIKE` | SQL Expression " NOT LIKE ".
    `static SqlEnum` | `ON` | SQL Expression " ON ".
    `static SqlEnum` | `UNION` | SQL Expression " UNION ".
    `static SqlEnum` | `UNION_ALL` | SQL Expression " UNION ALL ".

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(Object o)` | returns whether o is the same SqlEnum as this object.
    `int` | `getNumberOfCompareOperands()` | Returns the number of operands, if the SqlEnum is a comparison operator.
    `int` | `hashCode()` | returns a hashcode for this object which is consistent with equals()
    `String` | `toString()` |

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### EQUAL

          public static final SqlEnum EQUAL

      SQL Expression "=".

    - #### NOT_EQUAL

          public static final SqlEnum NOT_EQUAL

      SQL Expression "<>".

    - #### ALT_NOT_EQUAL

          public static final SqlEnum ALT_NOT_EQUAL

      SQL Expression "!=".

    - #### GREATER_THAN

          public static final SqlEnum GREATER_THAN

      SQL Expression ">".

    - #### LESS_THAN

          public static final SqlEnum LESS_THAN

      SQL Expression "<".

    - #### GREATER_EQUAL

          public static final SqlEnum GREATER_EQUAL

      SQL Expression ">=".

    - #### LESS_EQUAL

          public static final SqlEnum LESS_EQUAL

      SQL Expression "<=".

    - #### LIKE

          public static final SqlEnum LIKE

      SQL Expression " LIKE ".

    - #### NOT_LIKE

          public static final SqlEnum NOT_LIKE

      SQL Expression " NOT LIKE ".

    - #### ILIKE

          public static final SqlEnum ILIKE

      SQL Expression " ILIKE ".

    - #### NOT_ILIKE

          public static final SqlEnum NOT_ILIKE

      SQL Expression " NOT ILIKE ".

    - #### IN

          public static final SqlEnum IN

      SQL Expression " IN ".

    - #### NOT_IN

          public static final SqlEnum NOT_IN

      SQL Expression " NOT IN ".

    - #### JOIN

          public static final SqlEnum JOIN

      SQL Expression "JOIN".

    - #### DISTINCT

          public static final SqlEnum DISTINCT

      SQL Expression "DISTINCT ".

    - #### ALL

          public static final SqlEnum ALL

      SQL Expression "ALL ".

    - #### ASC

          public static final SqlEnum ASC

      SQL Expression "ASC".

    - #### DESC

          public static final SqlEnum DESC

      SQL Expression "DESC".

    - #### ISNULL

          public static final SqlEnum ISNULL

      SQL Expression " IS NULL".

    - #### ISNOTNULL

          public static final SqlEnum ISNOTNULL

      SQL Expression " IS NOT NULL".

    - #### CURRENT_DATE

          public static final SqlEnum CURRENT_DATE

      SQL Expression "CURRENT_DATE".

    - #### CURRENT_TIME

          public static final SqlEnum CURRENT_TIME

      SQL Expression "CURRENT_TIME".

    - #### CURRENT_TIMESTAMP

          public static final SqlEnum CURRENT_TIMESTAMP

      SQL Expression "CURRENT_TIMESTAMP".

    - #### ON

          public static final SqlEnum ON

      SQL Expression " ON ".

    - #### AS

          public static final SqlEnum AS

      SQL Expression " AS ".

    - #### ESCAPE

          public static final SqlEnum ESCAPE

      SQL Expression " ESCAPE ".

    - #### UNION

          public static final SqlEnum UNION

      SQL Expression " UNION ".

    - #### UNION_ALL

          public static final SqlEnum UNION_ALL

      SQL Expression " UNION ALL ".

    - #### INTERSECT

          public static final SqlEnum INTERSECT

      SQL Expression " INTERSECT ".

    - #### INTERSECT_ALL

          public static final SqlEnum INTERSECT_ALL

      SQL Expression " INTERSECT ALL ".

    - #### EXCEPT

          public static final SqlEnum EXCEPT

      SQL Expression " EXCEPT ".

    - #### EXCEPT_ALL

          public static final SqlEnum EXCEPT_ALL

      SQL Expression " EXCEPT ALL ".

    - #### MINUS

          public static final SqlEnum MINUS

      SQL Expression " MINUS ".

    - #### MINUS_ALL

          public static final SqlEnum MINUS_ALL

      SQL Expression " MINUS ALL ".

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getNumberOfCompareOperands

          public int getNumberOfCompareOperands()

      Returns the number of operands, if the SqlEnum is a comparison operator. A Set operand (e.g. in IN) is counted as one operand.
      Returns:
        the number of compare operands, or -1 if the SqlEnum is no comparison operator.

    - #### equals

          public boolean equals​(Object o)

      returns whether o is the same SqlEnum as this object. Two SqlEnums are considered equal if they contain the same String.
      Overrides:
        `equals` in class `Object`
      Parameters:
        `o` - the object to compare the SqlEnum with.

    - #### hashCode

          public int hashCode()

      returns a hashcode for this object which is consistent with equals()
      Overrides:
        `hashCode` in class `Object`