com.espertech.esper.util
Enum DatabaseTypeEnum

java.lang.Object
  extended by java.lang.Enum<DatabaseTypeEnum>
      extended by com.espertech.esper.util.DatabaseTypeEnum
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DatabaseTypeEnum>

public enum DatabaseTypeEnum
extends java.lang.Enum<DatabaseTypeEnum>

Enumeration of the different Java built-in types that are used to represent database output column values.

Assigns a name to each type that serves as a short name in mapping, and a Java class type.

Provides binding implementations that use the correct ResultSet.get method to pull the correct type out of a statement's result set.


Enum Constant Summary
BigDecimal
          Big decimal.
Boolean
          Boolean type.
Byte
          Byte type.
ByteArray
          Byte array type.
Double
          Double type.
Float
          Float type.
Int
          Integer type.
Long
          Long type.
Short
          Short type.
SqlDate
          SQL Date type.
SqlTime
          SQL time type.
SqlTimestamp
          SQL timestamp type.
String
          String type.
 
Method Summary
 DatabaseTypeBinding getBinding()
          Returns the binding for this enumeration value for reading the database result set and returning the right Java type.
static DatabaseTypeEnum getEnum(java.lang.String type)
          Given a type name, matches for simple and fully-qualified Java class name (case-insensitive) as well as case-insensitive type name.
 java.lang.Class getJavaClass()
          Retuns the Java class for the name.
static DatabaseTypeEnum valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DatabaseTypeEnum[] 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

String

public static final DatabaseTypeEnum String
String type.


BigDecimal

public static final DatabaseTypeEnum BigDecimal
Big decimal.


Boolean

public static final DatabaseTypeEnum Boolean
Boolean type.


Byte

public static final DatabaseTypeEnum Byte
Byte type.


Short

public static final DatabaseTypeEnum Short
Short type.


Int

public static final DatabaseTypeEnum Int
Integer type.


Long

public static final DatabaseTypeEnum Long
Long type.


Float

public static final DatabaseTypeEnum Float
Float type.


Double

public static final DatabaseTypeEnum Double
Double type.


ByteArray

public static final DatabaseTypeEnum ByteArray
Byte array type.


SqlDate

public static final DatabaseTypeEnum SqlDate
SQL Date type.


SqlTime

public static final DatabaseTypeEnum SqlTime
SQL time type.


SqlTimestamp

public static final DatabaseTypeEnum SqlTimestamp
SQL timestamp type.

Method Detail

values

public static DatabaseTypeEnum[] 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 (DatabaseTypeEnum c : DatabaseTypeEnum.values())
    System.out.println(c);

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

valueOf

public static DatabaseTypeEnum valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getJavaClass

public java.lang.Class getJavaClass()
Retuns the Java class for the name.

Returns:
Java class

getEnum

public static DatabaseTypeEnum getEnum(java.lang.String type)
Given a type name, matches for simple and fully-qualified Java class name (case-insensitive) as well as case-insensitive type name.

Parameters:
type - is the named type
Returns:
type enumeration value for type

getBinding

public DatabaseTypeBinding getBinding()
Returns the binding for this enumeration value for reading the database result set and returning the right Java type.

Returns:
mapping of output column type to Java built-in

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com