org.eigenbase.sql
Enum SqlIntervalQualifier.TimeUnit

java.lang.Object
  extended by java.lang.Enum<SqlIntervalQualifier.TimeUnit>
      extended by org.eigenbase.sql.SqlIntervalQualifier.TimeUnit
All Implemented Interfaces:
Serializable, Comparable<SqlIntervalQualifier.TimeUnit>, SqlLiteral.SqlSymbol
Enclosing class:
SqlIntervalQualifier

public static enum SqlIntervalQualifier.TimeUnit
extends Enum<SqlIntervalQualifier.TimeUnit>
implements SqlLiteral.SqlSymbol

Enumeration of time units used to construct an interval.


Enum Constant Summary
Day
           
Hour
           
Minute
           
Month
           
Second
           
Year
           
 
Field Summary
private static SqlIntervalQualifier.TimeUnit[] CachedValues
           
static String GET_VALUE_METHOD_NAME
           
 long multiplier
           
 boolean yearMonth
           
 
Method Summary
static SqlIntervalQualifier.TimeUnit getValue(int ordinal)
          Returns the TimeUnit associated with an ordinal.
static SqlIntervalQualifier.TimeUnit valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SqlIntervalQualifier.TimeUnit[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eigenbase.sql.SqlLiteral.SqlSymbol
name, ordinal
 

Enum Constant Detail

Year

public static final SqlIntervalQualifier.TimeUnit Year

Month

public static final SqlIntervalQualifier.TimeUnit Month

Day

public static final SqlIntervalQualifier.TimeUnit Day

Hour

public static final SqlIntervalQualifier.TimeUnit Hour

Minute

public static final SqlIntervalQualifier.TimeUnit Minute

Second

public static final SqlIntervalQualifier.TimeUnit Second
Field Detail

yearMonth

public final boolean yearMonth

multiplier

public final long multiplier

CachedValues

private static final SqlIntervalQualifier.TimeUnit[] CachedValues

GET_VALUE_METHOD_NAME

public static final String GET_VALUE_METHOD_NAME
See Also:
Constant Field Values
Method Detail

values

public static final SqlIntervalQualifier.TimeUnit[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(SqlIntervalQualifier.TimeUnit c : SqlIntervalQualifier.TimeUnit.values())
        System.out.println(c);

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

valueOf

public static SqlIntervalQualifier.TimeUnit 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

getValue

public static SqlIntervalQualifier.TimeUnit getValue(int ordinal)
Returns the TimeUnit associated with an ordinal. The value returned is null if the ordinal is not a member of the TimeUnit enumeration.