Top Description Fields Constructors Methods
java.sql

public final Enum JDBCType

extends Enum<JDBCType>
implements SQLType
Class Inheritance
All Implemented Interfaces
java.sql.SQLType

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

Since
1.8
See Also
SQLType

Field Summary

Modifier and TypeField and Description
public static final JDBCType
ARRAY

Identifies the generic SQL type ARRAY.

public static final JDBCType
BIGINT

Identifies the generic SQL type BIGINT.

public static final JDBCType
BINARY

Identifies the generic SQL type BINARY.

public static final JDBCType
BIT

Identifies the generic SQL type BIT.

public static final JDBCType
BLOB

Identifies the generic SQL type BLOB.

public static final JDBCType
BOOLEAN

Identifies the generic SQL type BOOLEAN.

public static final JDBCType
CHAR

Identifies the generic SQL type CHAR.

public static final JDBCType
CLOB

Identifies the generic SQL type CLOB.

public static final JDBCType
DATALINK

Identifies the generic SQL type DATALINK.

public static final JDBCType
DATE

Identifies the generic SQL type DATE.

public static final JDBCType
DECIMAL

Identifies the generic SQL type DECIMAL.

public static final JDBCType
DISTINCT

Identifies the generic SQL type DISTINCT.

public static final JDBCType
DOUBLE

Identifies the generic SQL type DOUBLE.

public static final JDBCType
FLOAT

Identifies the generic SQL type FLOAT.

public static final JDBCType
INTEGER

Identifies the generic SQL type INTEGER.

public static final JDBCType
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.

public static final JDBCType
LONGNVARCHAR

Identifies the generic SQL type LONGNVARCHAR.

public static final JDBCType
LONGVARBINARY

Identifies the generic SQL type LONGVARBINARY.

public static final JDBCType
LONGVARCHAR

Identifies the generic SQL type LONGVARCHAR.

public static final JDBCType
NCHAR

Identifies the generic SQL type NCHAR.

public static final JDBCType
NCLOB

Identifies the generic SQL type NCLOB.

public static final JDBCType
NULL

Identifies the generic SQL value NULL.

public static final JDBCType
NUMERIC

Identifies the generic SQL type NUMERIC.

public static final JDBCType
NVARCHAR

Identifies the generic SQL type NVARCHAR.

public static final JDBCType
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.

public static final JDBCType
REAL

Identifies the generic SQL type REAL.

public static final JDBCType
REF

Identifies the generic SQL type REF.

public static final JDBCType
REF_CURSOR

Identifies the generic SQL type REF_CURSOR.

public static final JDBCType
ROWID

Identifies the SQL type ROWID.

public static final JDBCType
SMALLINT

Identifies the generic SQL type SMALLINT.

public static final JDBCType
SQLXML

Identifies the generic SQL type SQLXML.

public static final JDBCType
STRUCT

Identifies the generic SQL type STRUCT.

public static final JDBCType
TIME

Identifies the generic SQL type TIME.

public static final JDBCType
TIME_WITH_TIMEZONE

Identifies the generic SQL type TIME_WITH_TIMEZONE.

public static final JDBCType
TIMESTAMP

Identifies the generic SQL type TIMESTAMP.

public static final JDBCType
TIMESTAMP_WITH_TIMEZONE

Identifies the generic SQL type TIMESTAMP_WITH_TIMEZONE.

public static final JDBCType
TINYINT

Identifies the generic SQL type TINYINT.

private final Integer
type

The Integer value for the JDBCType.

public static final JDBCType
VARBINARY

Identifies the generic SQL type VARBINARY.

public static final JDBCType
VARCHAR

Identifies the generic SQL type VARCHAR.

Constructor Summary

AccessConstructor and Description
private
JDBCType(final Integer
The value from Types for this data type
type
)

Constructor to specify the data type value from Types for this data type.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The name of this SQLType.
getName
()

Implements java.sql.SQLType.getName.

Returns the SQLType name that represents a SQL data type.
public String

Returns:

The name of the vendor for this data type which is java.sql for JDBCType.
getVendor
()

Implements java.sql.SQLType.getVendor.

Returns the name of the vendor that supports this data type.
public Integer

Returns:

An Integer representing the data type. For JDBCType, the value will be the same value as in Types for the data type.
getVendorTypeNumber
()

Implements java.sql.SQLType.getVendorTypeNumber.

Returns the vendor specific type number for the data type.
public static JDBCType
public static JDBCType

Returns:

The JDBCType constant
valueOf
(int
Types value
type
)

Returns the JDBCType that corresponds to the specified Types value

public static JDBCType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ARRAYback to summary
public static final JDBCType ARRAY

Identifies the generic SQL type ARRAY.

BIGINTback to summary
public static final JDBCType BIGINT

Identifies the generic SQL type BIGINT.

BINARYback to summary
public static final JDBCType BINARY

Identifies the generic SQL type BINARY.

BITback to summary
public static final JDBCType BIT

Identifies the generic SQL type BIT.

BLOBback to summary
public static final JDBCType BLOB

Identifies the generic SQL type BLOB.

BOOLEANback to summary
public static final JDBCType BOOLEAN

Identifies the generic SQL type BOOLEAN.

CHARback to summary
public static final JDBCType CHAR

Identifies the generic SQL type CHAR.

CLOBback to summary
public static final JDBCType CLOB

Identifies the generic SQL type CLOB.

DATEback to summary
public static final JDBCType DATE

Identifies the generic SQL type DATE.

DECIMALback to summary
public static final JDBCType DECIMAL

Identifies the generic SQL type DECIMAL.

DISTINCTback to summary
public static final JDBCType DISTINCT

Identifies the generic SQL type DISTINCT.

DOUBLEback to summary
public static final JDBCType DOUBLE

Identifies the generic SQL type DOUBLE.

FLOATback to summary
public static final JDBCType FLOAT

Identifies the generic SQL type FLOAT.

INTEGERback to summary
public static final JDBCType INTEGER

Identifies the generic SQL type INTEGER.

JAVA_OBJECTback to summary
public static final JDBCType 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.

LONGNVARCHARback to summary
public static final JDBCType LONGNVARCHAR

Identifies the generic SQL type LONGNVARCHAR.

LONGVARBINARYback to summary
public static final JDBCType LONGVARBINARY

Identifies the generic SQL type LONGVARBINARY.

LONGVARCHARback to summary
public static final JDBCType LONGVARCHAR

Identifies the generic SQL type LONGVARCHAR.

NCHARback to summary
public static final JDBCType NCHAR

Identifies the generic SQL type NCHAR.

NCLOBback to summary
public static final JDBCType NCLOB

Identifies the generic SQL type NCLOB.

NULLback to summary
public static final JDBCType NULL

Identifies the generic SQL value NULL.

NUMERICback to summary
public static final JDBCType NUMERIC

Identifies the generic SQL type NUMERIC.

NVARCHARback to summary
public static final JDBCType NVARCHAR

Identifies the generic SQL type NVARCHAR.

OTHERback to summary
public static final JDBCType 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.

REALback to summary
public static final JDBCType REAL

Identifies the generic SQL type REAL.

REFback to summary
public static final JDBCType REF

Identifies the generic SQL type REF.

REF_CURSORback to summary
public static final JDBCType REF_CURSOR

Identifies the generic SQL type REF_CURSOR.

ROWIDback to summary
public static final JDBCType ROWID

Identifies the SQL type ROWID.

SMALLINTback to summary
public static final JDBCType SMALLINT

Identifies the generic SQL type SMALLINT.

SQLXMLback to summary
public static final JDBCType SQLXML

Identifies the generic SQL type SQLXML.

STRUCTback to summary
public static final JDBCType STRUCT

Identifies the generic SQL type STRUCT.

TIMEback to summary
public static final JDBCType TIME

Identifies the generic SQL type TIME.

TIME_WITH_TIMEZONEback to summary
public static final JDBCType TIME_WITH_TIMEZONE

Identifies the generic SQL type TIME_WITH_TIMEZONE.

TIMESTAMPback to summary
public static final JDBCType TIMESTAMP

Identifies the generic SQL type TIMESTAMP.

TIMESTAMP_WITH_TIMEZONEback to summary
public static final JDBCType TIMESTAMP_WITH_TIMEZONE

Identifies the generic SQL type TIMESTAMP_WITH_TIMEZONE.

TINYINTback to summary
public static final JDBCType TINYINT

Identifies the generic SQL type TINYINT.

typeback to summary
private final Integer type

The Integer value for the JDBCType. It maps to a value in Types.java

VARBINARYback to summary
public static final JDBCType VARBINARY

Identifies the generic SQL type VARBINARY.

VARCHARback to summary
public static final JDBCType VARCHAR

Identifies the generic SQL type VARCHAR.

Constructor Detail

JDBCTypeback to summary
private JDBCType(final Integer type)

Constructor to specify the data type value from Types for this data type.

Parameters
type:Integer

The value from Types for this data type

Method Detail

getNameback to summary
public String getName()

Implements java.sql.SQLType.getName.

Doc from java.sql.SQLType.getName.

Returns the SQLType name that represents a SQL data type.

Returns:String

The name of this SQLType.

getVendorback to summary
public String getVendor()

Implements java.sql.SQLType.getVendor.

Returns the name of the vendor that supports this data type.

Returns:String

The name of the vendor for this data type which is java.sql for JDBCType.

getVendorTypeNumberback to summary
public Integer getVendorTypeNumber()

Implements java.sql.SQLType.getVendorTypeNumber.

Returns the vendor specific type number for the data type.

Returns:Integer

An Integer representing the data type. For JDBCType, the value will be the same value as in Types for the data type.

valueOfback to summary
public static JDBCType valueOf(String name)
valueOfback to summary
public static JDBCType valueOf(int type)

Returns the JDBCType that corresponds to the specified Types value

Parameters
type:int

Types value

Returns:JDBCType

The JDBCType constant

Exceptions
IllegalArgumentException:
if this enum type has no constant with the specified Types value
See Also
Types
valuesback to summary
public static JDBCType[] values()