Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 1397355 2012-10-11 22:52:33Z tfischer $
Author:
  , Thomas Fischer
See Also:
  Serialized Form

Field Summary
`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` | `CUSTOM` Deprecated. use the methods Criteria.whereVerbatimSql, Criteria.andVerbatimSql, Criteria.orVerbatimSql or the Constructor Criterion(null, null, null, String, Object[]) instead of using SqlEnum.CUSTOM. This constant will be removed in Torque 4.1.
`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` | `GREATER_EQUAL` SQL Expression ">=".
`static SqlEnum` | `GREATER_THAN` SQL Expression ">".
`static SqlEnum` | `ILIKE` SQL Expression " ILIKE ".
`static SqlEnum` | `IN` SQL Expression " IN ".
`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` | `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 ".

Method Summary
`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 ".

### CUSTOM

    @Deprecated
    public static final SqlEnum CUSTOM

  Deprecated. use the methods Criteria.whereVerbatimSql, Criteria.andVerbatimSql, Criteria.orVerbatimSql or the Constructor Criterion(null, null, null, String, Object[]) instead of using SqlEnum.CUSTOM. This constant will be removed in Torque 4.1.
  Constant for "CUSTOM".

### 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 ".

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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2013 The Apache Software Foundation. All Rights Reserved.