net.sf.saffron.sql
Class SqlKind

java.lang.Object
  |
  +--net.sf.saffron.util.EnumeratedValues.BasicValue
        |
        +--net.sf.saffron.sql.SqlKind
All Implemented Interfaces:
EnumeratedValues.Value

public class SqlKind
extends EnumeratedValues.BasicValue

Enumerates the possible types of SqlNode.

Only commonly-used nodes have their own type; other nodes are of type Other. Some of the values, such as SetQuery, represent aggregates.

Since:
Dec 12, 2003
Version:
$Id: //open/saffron/src/net/sf/saffron/oj/xlat/SqlToOpenjavaConverter.java#7 $
Author:
jhyde

Field Summary
static SqlKind And
          And
static int AndORDINAL
           
static SqlKind As
          As
static int AsORDINAL
           
static SqlKind Delete
          DELETE statement
static int DeleteORDINAL
           
static SqlKind Descending
           
static int DescendingORDINAL
          Descending
static SqlKind Divide
          Divide
static int DivideORDINAL
           
static SqlKind Dml
           
static int DmlORDINAL
          Dml is an aggregate of all DML operators.
static SqlKind Dot
          Dot
static int DotORDINAL
           
static EnumeratedValues enumeration
           
static SqlKind Equals
          Equals
static int EqualsORDINAL
           
static SqlKind Except
          Except
static int ExceptORDINAL
           
static SqlKind Exists
           
static int ExistsORDINAL
          Exists
static SqlKind Explain
          EXPLAIN statement
static int ExplainORDINAL
           
static SqlKind Expression
           
static int ExpressionORDINAL
          Expression is an aggregate of all expression operators.
static SqlKind Function
          Function
static int FunctionORDINAL
           
static SqlKind GreaterThan
          GreaterThan
static int GreaterThanORDINAL
           
static SqlKind GreaterThanOrEqual
          GreaterThanOrEqual
static int GreaterThanOrEqualORDINAL
           
static SqlKind Identifier
          Identifier
static int IdentifierORDINAL
           
static SqlKind In
          In
static int InORDINAL
           
static SqlKind Insert
          INSERT statement
static int InsertORDINAL
           
static SqlKind Intersect
          Intersect
static int IntersectORDINAL
           
static SqlKind Join
          JOIN operator or compound FROM clause.
static int JoinORDINAL
           
static SqlKind LessThan
          LessThan
static int LessThanORDINAL
           
static SqlKind LessThanOrEqual
          LessThanOrEqual
static int LessThanOrEqualORDINAL
           
static SqlKind Literal
          Literal
static int LiteralORDINAL
           
static SqlKind Minus
          Minus
static int MinusORDINAL
           
static SqlKind MinusPrefix
           
static int MinusPrefixORDINAL
          MinusPrefix
static SqlKind Not
           
static SqlKind NotEquals
          NotEquals
static int NotEqualsORDINAL
           
static int NotORDINAL
          Not
static SqlKind Or
          Or
static int OrORDINAL
           
static SqlKind Other
          Other
static int OtherORDINAL
           
static SqlKind Plus
          Plus
static int PlusORDINAL
           
static SqlKind PlusPrefix
           
static int PlusPrefixORDINAL
          PlusPrefix
static SqlKind Query
          Query is an aggregate of query node types.
static int QueryORDINAL
           
static SqlKind Select
          SELECT statement or sub-query
static int SelectORDINAL
           
static SqlKind SetQuery
           
static int SetQueryORDINAL
          SetQuery is an aggregate of set-query node types.
static SqlKind Times
          Times
static int TimesORDINAL
           
static SqlKind TopLevel
          Aggregate of SQL statement types Query, Dml.
static int TopLevelORDINAL
           
static SqlKind Union
          Union
static int UnionORDINAL
           
static SqlKind Update
          UPDATE statement
static int UpdateORDINAL
           
static SqlKind Values
           
static int ValuesORDINAL
          Values
 
Fields inherited from class net.sf.saffron.util.EnumeratedValues.BasicValue
description_, name_, ordinal_
 
Constructor Summary
private SqlKind(String name, int ordinal)
           
 
Method Summary
static SqlKind get(int ordinal)
          Looks up a kind from its ordinal.
static SqlKind get(String name)
          Looks up a kind from its name.
 boolean isA(SqlKind kind)
          Returns whether this kind is the same as a given kind, or is a member if the given kind is an aggregate
 
Methods inherited from class net.sf.saffron.util.EnumeratedValues.BasicValue
equals, getDescription, getName, getOrdinal, toString, unexpected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OtherORDINAL

public static final int OtherORDINAL
See Also:
Constant Field Values

Other

public static final SqlKind Other
Other


SelectORDINAL

public static final int SelectORDINAL
See Also:
Constant Field Values

Select

public static final SqlKind Select
SELECT statement or sub-query


JoinORDINAL

public static final int JoinORDINAL
See Also:
Constant Field Values

Join

public static final SqlKind Join
JOIN operator or compound FROM clause.

A FROM clause with more than one table is represented as if it were a join. For example, "FROM x, y, z" is represented as "JOIN(x, JOIN(x, y))".


IdentifierORDINAL

public static final int IdentifierORDINAL
See Also:
Constant Field Values

Identifier

public static final SqlKind Identifier
Identifier


LiteralORDINAL

public static final int LiteralORDINAL
See Also:
Constant Field Values

Literal

public static final SqlKind Literal
Literal


FunctionORDINAL

public static final int FunctionORDINAL
See Also:
Constant Field Values

Function

public static final SqlKind Function
Function


ExplainORDINAL

public static final int ExplainORDINAL
See Also:
Constant Field Values

Explain

public static final SqlKind Explain
EXPLAIN statement


InsertORDINAL

public static final int InsertORDINAL
See Also:
Constant Field Values

Insert

public static final SqlKind Insert
INSERT statement


DeleteORDINAL

public static final int DeleteORDINAL
See Also:
Constant Field Values

Delete

public static final SqlKind Delete
DELETE statement


UpdateORDINAL

public static final int UpdateORDINAL
See Also:
Constant Field Values

Update

public static final SqlKind Update
UPDATE statement


TimesORDINAL

public static final int TimesORDINAL
See Also:
Constant Field Values

Times

public static final SqlKind Times
Times


DivideORDINAL

public static final int DivideORDINAL
See Also:
Constant Field Values

Divide

public static final SqlKind Divide
Divide


PlusORDINAL

public static final int PlusORDINAL
See Also:
Constant Field Values

Plus

public static final SqlKind Plus
Plus


MinusORDINAL

public static final int MinusORDINAL
See Also:
Constant Field Values

Minus

public static final SqlKind Minus
Minus


InORDINAL

public static final int InORDINAL
See Also:
Constant Field Values

In

public static final SqlKind In
In


LessThanORDINAL

public static final int LessThanORDINAL
See Also:
Constant Field Values

LessThan

public static final SqlKind LessThan
LessThan


GreaterThanORDINAL

public static final int GreaterThanORDINAL
See Also:
Constant Field Values

GreaterThan

public static final SqlKind GreaterThan
GreaterThan


LessThanOrEqualORDINAL

public static final int LessThanOrEqualORDINAL
See Also:
Constant Field Values

LessThanOrEqual

public static final SqlKind LessThanOrEqual
LessThanOrEqual


GreaterThanOrEqualORDINAL

public static final int GreaterThanOrEqualORDINAL
See Also:
Constant Field Values

GreaterThanOrEqual

public static final SqlKind GreaterThanOrEqual
GreaterThanOrEqual


EqualsORDINAL

public static final int EqualsORDINAL
See Also:
Constant Field Values

Equals

public static final SqlKind Equals
Equals


NotEqualsORDINAL

public static final int NotEqualsORDINAL
See Also:
Constant Field Values

NotEquals

public static final SqlKind NotEquals
NotEquals


OrORDINAL

public static final int OrORDINAL
See Also:
Constant Field Values

Or

public static final SqlKind Or
Or


AndORDINAL

public static final int AndORDINAL
See Also:
Constant Field Values

And

public static final SqlKind And
And


DotORDINAL

public static final int DotORDINAL
See Also:
Constant Field Values

Dot

public static final SqlKind Dot
Dot


UnionORDINAL

public static final int UnionORDINAL
See Also:
Constant Field Values

Union

public static final SqlKind Union
Union


ExceptORDINAL

public static final int ExceptORDINAL
See Also:
Constant Field Values

Except

public static final SqlKind Except
Except


IntersectORDINAL

public static final int IntersectORDINAL
See Also:
Constant Field Values

Intersect

public static final SqlKind Intersect
Intersect


AsORDINAL

public static final int AsORDINAL
See Also:
Constant Field Values

As

public static final SqlKind As
As


NotORDINAL

public static final int NotORDINAL
Not

See Also:
Constant Field Values

Not

public static final SqlKind Not

PlusPrefixORDINAL

public static final int PlusPrefixORDINAL
PlusPrefix

See Also:
Constant Field Values

PlusPrefix

public static final SqlKind PlusPrefix

MinusPrefixORDINAL

public static final int MinusPrefixORDINAL
MinusPrefix

See Also:
Constant Field Values

MinusPrefix

public static final SqlKind MinusPrefix

ExistsORDINAL

public static final int ExistsORDINAL
Exists

See Also:
Constant Field Values

Exists

public static final SqlKind Exists

ValuesORDINAL

public static final int ValuesORDINAL
Values

See Also:
Constant Field Values

Values

public static final SqlKind Values

DescendingORDINAL

public static final int DescendingORDINAL
Descending

See Also:
Constant Field Values

Descending

public static final SqlKind Descending

SetQueryORDINAL

public static final int SetQueryORDINAL
SetQuery is an aggregate of set-query node types. node.isA(Kind.SetQuery) evaluates to true if it node is an Except, Intersect or Union.

See Also:
Constant Field Values

SetQuery

public static final SqlKind SetQuery

ExpressionORDINAL

public static final int ExpressionORDINAL
Expression is an aggregate of all expression operators.

See Also:
Constant Field Values

Expression

public static final SqlKind Expression

DmlORDINAL

public static final int DmlORDINAL
Dml is an aggregate of all DML operators. node.isA(Kind.Dml) evaluates to true if it node is an Insert or Delete.

See Also:
Constant Field Values

Dml

public static final SqlKind Dml

QueryORDINAL

public static final int QueryORDINAL
See Also:
Constant Field Values

Query

public static final SqlKind Query
Query is an aggregate of query node types. node.isA(Kind.SetQuery) evaluates to true if it node is a Except, Intersect, Select or Union.


TopLevelORDINAL

public static final int TopLevelORDINAL
See Also:
Constant Field Values

TopLevel

public static final SqlKind TopLevel
Aggregate of SQL statement types Query, Dml.


enumeration

public static final EnumeratedValues enumeration
Constructor Detail

SqlKind

private SqlKind(String name,
                int ordinal)
Method Detail

isA

public boolean isA(SqlKind kind)
Returns whether this kind is the same as a given kind, or is a member if the given kind is an aggregate


get

public static SqlKind get(int ordinal)
Looks up a kind from its ordinal.


get

public static SqlKind get(String name)
Looks up a kind from its name.


SourceForge.net_Logo