Package Summary  Overview Summary


java.sql
Enum JDBCTypes

java.lang.Object
  extended by java.lang.Enum<JDBCTypes>
      extended by java.sql.JDBCTypes


All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<JDBCTypes>, SQLType

public enum JDBCTypes
extends java.lang.Enum<JDBCTypes>
implements SQLType

Defines the constants that are used to identify generic SQL types, called JDBC types.

Since:
1.8


Enum Constant Summary
ARRAY
          Identifies the generic SQL type ARRAY.
BIGINT
          Identifies the generic SQL type BIGINT.
BINARY
          Identifies the generic SQL type BINARY.
BIT
          Identifies the generic SQL type BIT.
BLOB
          Identifies the generic SQL type BLOB.
BOOLEAN
          Identifies the generic SQL type BOOLEAN.
CHAR
          Identifies the generic SQL type CHAR.
CLOB
          Identifies the generic SQL type CLOB.
DATALINK
          Identifies the generic SQL type DATALINK.
DATE
          Identifies the generic SQL type DATE.
DECIMAL
          Identifies the generic SQL type DECIMAL.
DISTINCT
          Identifies the generic SQL type DISTINCT.
DOUBLE
          Identifies the generic SQL type DOUBLE.
FLOAT
          Identifies the generic SQL type FLOAT.
INTEGER
          Identifies the generic SQL type INTEGER.
JAVA_OBJECT
          Indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.
LONGNVARCHAR
          Identifies the generic SQL type LONGNVARCHAR.
LONGVARBINARY
          Identifies the generic SQL type LONGVARBINARY.
LONGVARCHAR
          Identifies the generic SQL type LONGVARCHAR.
NCHAR
          Identifies the generic SQL type NCHAR.
NCLOB
          Identifies the generic SQL type NCLOB.
NULL
          Identifies the generic SQL value NULL.
NUMERIC
          Identifies the generic SQL type NUMERIC.
NVARCHAR
          Identifies the generic SQL type NVARCHAR.
OTHER
          Indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.
REAL
          Identifies the generic SQL type REAL.
REF
          Identifies the generic SQL type REF.
REF_CURSOR
          Identifies the generic SQL type REF_CURSOR.
ROWID
          Identifies the SQL type ROWID.
SMALLINT
          Identifies the generic SQL type SMALLINT.
SQLXML
          Identifies the generic SQL type SQLXML.
STRUCT
          Identifies the generic SQL type STRUCT.
TIME
          Identifies the generic SQL type TIME.
TIMESTAMP
          Identifies the generic SQL type TIMESTAMP.
TINYINT
          Identifies the generic SQL type TINYINT.
VARBINARY
          Identifies the generic SQL type VARBINARY.
VARCHAR
          Identifies the generic SQL type VARCHAR.
 
Method Summary
 java.lang.StringgetName()
          Returns the name of the data type.
 java.lang.StringgetVendor()
          Returns the name of the vendor that supports this data type.
 java.lang.IntegergetVendorTypeNumber()
          Returns the vendor specific type number for the data type.
static JDBCTypesvalueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static JDBCTypes[]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 JDBCTypesBIT
Identifies the generic SQL type BIT.


TINYINT

public static final JDBCTypesTINYINT
Identifies the generic SQL type TINYINT.


SMALLINT

public static final JDBCTypesSMALLINT
Identifies the generic SQL type SMALLINT.


INTEGER

public static final JDBCTypesINTEGER
Identifies the generic SQL type INTEGER.


BIGINT

public static final JDBCTypesBIGINT
Identifies the generic SQL type BIGINT.


FLOAT

public static final JDBCTypesFLOAT
Identifies the generic SQL type FLOAT.


REAL

public static final JDBCTypesREAL
Identifies the generic SQL type REAL.


DOUBLE

public static final JDBCTypesDOUBLE
Identifies the generic SQL type DOUBLE.


NUMERIC

public static final JDBCTypesNUMERIC
Identifies the generic SQL type NUMERIC.


DECIMAL

public static final JDBCTypesDECIMAL
Identifies the generic SQL type DECIMAL.


CHAR

public static final JDBCTypesCHAR
Identifies the generic SQL type CHAR.


VARCHAR

public static final JDBCTypesVARCHAR
Identifies the generic SQL type VARCHAR.


LONGVARCHAR

public static final JDBCTypesLONGVARCHAR
Identifies the generic SQL type LONGVARCHAR.


DATE

public static final JDBCTypesDATE
Identifies the generic SQL type DATE.


TIME

public static final JDBCTypesTIME
Identifies the generic SQL type TIME.


TIMESTAMP

public static final JDBCTypesTIMESTAMP
Identifies the generic SQL type TIMESTAMP.


BINARY

public static final JDBCTypesBINARY
Identifies the generic SQL type BINARY.


VARBINARY

public static final JDBCTypesVARBINARY
Identifies the generic SQL type VARBINARY.


LONGVARBINARY

public static final JDBCTypesLONGVARBINARY
Identifies the generic SQL type LONGVARBINARY.


NULL

public static final JDBCTypesNULL
Identifies the generic SQL value NULL.


OTHER

public static final JDBCTypesOTHER
Indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.


JAVA_OBJECT

public static final JDBCTypesJAVA_OBJECT
Indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.


DISTINCT

public static final JDBCTypesDISTINCT
Identifies the generic SQL type DISTINCT.


STRUCT

public static final JDBCTypesSTRUCT
Identifies the generic SQL type STRUCT.


ARRAY

public static final JDBCTypesARRAY
Identifies the generic SQL type ARRAY.


BLOB

public static final JDBCTypesBLOB
Identifies the generic SQL type BLOB.


CLOB

public static final JDBCTypesCLOB
Identifies the generic SQL type CLOB.


REF

public static final JDBCTypesREF
Identifies the generic SQL type REF.


DATALINK

public static final JDBCTypesDATALINK
Identifies the generic SQL type DATALINK.


BOOLEAN

public static final JDBCTypesBOOLEAN
Identifies the generic SQL type BOOLEAN.


ROWID

public static final JDBCTypesROWID
Identifies the SQL type ROWID.


NCHAR

public static final JDBCTypesNCHAR
Identifies the generic SQL type NCHAR.


NVARCHAR

public static final JDBCTypesNVARCHAR
Identifies the generic SQL type NVARCHAR.


LONGNVARCHAR

public static final JDBCTypesLONGNVARCHAR
Identifies the generic SQL type LONGNVARCHAR.


NCLOB

public static final JDBCTypesNCLOB
Identifies the generic SQL type NCLOB.


SQLXML

public static final JDBCTypesSQLXML
Identifies the generic SQL type SQLXML.


REF_CURSOR

public static final JDBCTypesREF_CURSOR
Identifies the generic SQL type REF_CURSOR.

Method Detail

values

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

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

valueOf

public static JDBCTypesvalueOf(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

getName

public java.lang.String getName()
Returns the name of the data type.

Specified by:
getName in interface SQLType
Returns:
The name of the data type.

getVendor

public java.lang.String getVendor()
Returns the name of the vendor that supports this data type.

Specified by:
getVendor in interface SQLType
Returns:
The name of the vendor for this data type which is java.sql for JDBCTypes.

getVendorTypeNumber

public java.lang.Integer getVendorTypeNumber()
Returns the vendor specific type number for the data type.

Specified by:
getVendorTypeNumber in interface SQLType
Returns:
An Integer representing the data type. For JDBCTypes, the value will be the same value as in Types for the data type.


Java is a trademark or registered trademark of Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A All Rights Reserved.