Spring Integration

org.springframework.integration.jdbc.config
Enum JdbcTypesEnum

java.lang.Object
  extended by java.lang.Enum<JdbcTypesEnum>
      extended by org.springframework.integration.jdbc.config.JdbcTypesEnum
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<JdbcTypesEnum>

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

This Enumeration provides a handy wrapper around Types. This makes it possible to look up String representation of the enum constant's name, and thus looking up the respective JDBC Type (int-value).

Since:
2.1
Author:
Gunnar Hillert

Enum Constant Summary
ARRAY
           
BIGINT
           
BINARY
           
BIT
           
BLOB
           
BOOLEAN
           
CHAR
           
CLOB
           
DATALINK
           
DATE
           
DECIMAL
           
DISTINCT
           
DOUBLE
           
FLOAT
           
INTEGER
           
JAVA_OBJECT
           
LONGNVARCHAR
           
LONGVARBINARY
           
LONGVARCHAR
           
NCHAR
           
NCLOB
           
NULL
           
NUMERIC
           
NVARCHAR
           
OTHER
           
REAL
           
REF
           
ROWID
           
SMALLINT
           
SQLXML
           
STRUCT
           
TIME
           
TIMESTAMP
           
TINYINT
           
VARBINARY
           
VARCHAR
           
 
Method Summary
static JdbcTypesEnum convertToJdbcTypesEnum(java.lang.String sqlTypeAsString)
          Retrieves the matching enum constant for a provided String representation of the SQL Types.
 int getCode()
          Get the numerical representation of the JDBC Type enum.
static JdbcTypesEnum valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static JdbcTypesEnum[] 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

BIT

public static final JdbcTypesEnum BIT

TINYINT

public static final JdbcTypesEnum TINYINT

SMALLINT

public static final JdbcTypesEnum SMALLINT

INTEGER

public static final JdbcTypesEnum INTEGER

BIGINT

public static final JdbcTypesEnum BIGINT

FLOAT

public static final JdbcTypesEnum FLOAT

REAL

public static final JdbcTypesEnum REAL

DOUBLE

public static final JdbcTypesEnum DOUBLE

NUMERIC

public static final JdbcTypesEnum NUMERIC

DECIMAL

public static final JdbcTypesEnum DECIMAL

CHAR

public static final JdbcTypesEnum CHAR

VARCHAR

public static final JdbcTypesEnum VARCHAR

LONGVARCHAR

public static final JdbcTypesEnum LONGVARCHAR

DATE

public static final JdbcTypesEnum DATE

TIME

public static final JdbcTypesEnum TIME

TIMESTAMP

public static final JdbcTypesEnum TIMESTAMP

BINARY

public static final JdbcTypesEnum BINARY

VARBINARY

public static final JdbcTypesEnum VARBINARY

LONGVARBINARY

public static final JdbcTypesEnum LONGVARBINARY

NULL

public static final JdbcTypesEnum NULL

OTHER

public static final JdbcTypesEnum OTHER

JAVA_OBJECT

public static final JdbcTypesEnum JAVA_OBJECT

DISTINCT

public static final JdbcTypesEnum DISTINCT

STRUCT

public static final JdbcTypesEnum STRUCT

ARRAY

public static final JdbcTypesEnum ARRAY

BLOB

public static final JdbcTypesEnum BLOB

CLOB

public static final JdbcTypesEnum CLOB

REF

public static final JdbcTypesEnum REF

DATALINK

public static final JdbcTypesEnum DATALINK

BOOLEAN

public static final JdbcTypesEnum BOOLEAN

ROWID

public static final JdbcTypesEnum ROWID

NCHAR

public static final JdbcTypesEnum NCHAR

NVARCHAR

public static final JdbcTypesEnum NVARCHAR

LONGNVARCHAR

public static final JdbcTypesEnum LONGNVARCHAR

NCLOB

public static final JdbcTypesEnum NCLOB

SQLXML

public static final JdbcTypesEnum SQLXML
Method Detail

values

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

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

valueOf

public static JdbcTypesEnum 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

getCode

public int getCode()
Get the numerical representation of the JDBC Type enum. The numerical value matches exactly the equivalent value in Types

Returns:
The numerical representation of the constant.

convertToJdbcTypesEnum

public static JdbcTypesEnum convertToJdbcTypesEnum(java.lang.String sqlTypeAsString)
Retrieves the matching enum constant for a provided String representation of the SQL Types. The provided name must match exactly the identifier as used to declare the enum constant.

Parameters:
sqlTypeAsString - Name of the enum to convert. Must be not null and not empty.
Returns:
The enumeration that matches. Returns Null of no match was found.

Spring Integration