- All Implemented Interfaces:
Serializable
,Comparable<JDBCType>
,Constable
,SQLType
public enum JDBCType extends Enum<JDBCType> implements SQLType
Defines the constants that are used to identify generic SQL types, called JDBC types.
- Since:
- 1.8
- See Also:
SQLType
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description ARRAY
Identifies the generic SQL typeARRAY
.BIGINT
Identifies the generic SQL typeBIGINT
.BINARY
Identifies the generic SQL typeBINARY
.BIT
Identifies the generic SQL typeBIT
.BLOB
Identifies the generic SQL typeBLOB
.BOOLEAN
Identifies the generic SQL typeBOOLEAN
.CHAR
Identifies the generic SQL typeCHAR
.CLOB
Identifies the generic SQL typeCLOB
.DATALINK
Identifies the generic SQL typeDATALINK
.DATE
Identifies the generic SQL typeDATE
.DECIMAL
Identifies the generic SQL typeDECIMAL
.DISTINCT
Identifies the generic SQL typeDISTINCT
.DOUBLE
Identifies the generic SQL typeDOUBLE
.FLOAT
Identifies the generic SQL typeFLOAT
.INTEGER
Identifies the generic SQL typeINTEGER
.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 typeLONGNVARCHAR
.LONGVARBINARY
Identifies the generic SQL typeLONGVARBINARY
.LONGVARCHAR
Identifies the generic SQL typeLONGVARCHAR
.NCHAR
Identifies the generic SQL typeNCHAR
.NCLOB
Identifies the generic SQL typeNCLOB
.NULL
Identifies the generic SQL valueNULL
.NUMERIC
Identifies the generic SQL typeNUMERIC
.NVARCHAR
Identifies the generic SQL typeNVARCHAR
.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 typeREAL
.REF
Identifies the generic SQL typeREF
.REF_CURSOR
Identifies the generic SQL typeREF_CURSOR
.ROWID
Identifies the SQL typeROWID
.SMALLINT
Identifies the generic SQL typeSMALLINT
.SQLXML
Identifies the generic SQL typeSQLXML
.STRUCT
Identifies the generic SQL typeSTRUCT
.TIME
Identifies the generic SQL typeTIME
.TIME_WITH_TIMEZONE
Identifies the generic SQL typeTIME_WITH_TIMEZONE
.TIMESTAMP
Identifies the generic SQL typeTIMESTAMP
.TIMESTAMP_WITH_TIMEZONE
Identifies the generic SQL typeTIMESTAMP_WITH_TIMEZONE
.TINYINT
Identifies the generic SQL typeTINYINT
.VARBINARY
Identifies the generic SQL typeVARBINARY
.VARCHAR
Identifies the generic SQL typeVARCHAR
. -
Method Summary
Modifier and Type Method Description String
getName()
Returns theSQLType
name that represents a SQL data type.String
getVendor()
Returns the name of the vendor that supports this data type.Integer
getVendorTypeNumber()
Returns the vendor specific type number for the data type.static JDBCType
valueOf(int type)
Returns theJDBCType
that corresponds to the specifiedTypes
valuestatic JDBCType
valueOf(String name)
Returns the enum constant of this type with the specified name.static JDBCType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BIT
Identifies the generic SQL typeBIT
. -
TINYINT
Identifies the generic SQL typeTINYINT
. -
SMALLINT
Identifies the generic SQL typeSMALLINT
. -
INTEGER
Identifies the generic SQL typeINTEGER
. -
BIGINT
Identifies the generic SQL typeBIGINT
. -
FLOAT
Identifies the generic SQL typeFLOAT
. -
REAL
Identifies the generic SQL typeREAL
. -
DOUBLE
Identifies the generic SQL typeDOUBLE
. -
NUMERIC
Identifies the generic SQL typeNUMERIC
. -
DECIMAL
Identifies the generic SQL typeDECIMAL
. -
CHAR
Identifies the generic SQL typeCHAR
. -
VARCHAR
Identifies the generic SQL typeVARCHAR
. -
LONGVARCHAR
Identifies the generic SQL typeLONGVARCHAR
. -
DATE
Identifies the generic SQL typeDATE
. -
TIME
Identifies the generic SQL typeTIME
. -
TIMESTAMP
Identifies the generic SQL typeTIMESTAMP
. -
BINARY
Identifies the generic SQL typeBINARY
. -
VARBINARY
Identifies the generic SQL typeVARBINARY
. -
LONGVARBINARY
Identifies the generic SQL typeLONGVARBINARY
. -
NULL
Identifies the generic SQL valueNULL
. -
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. -
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. -
DISTINCT
Identifies the generic SQL typeDISTINCT
. -
STRUCT
Identifies the generic SQL typeSTRUCT
. -
ARRAY
Identifies the generic SQL typeARRAY
. -
BLOB
Identifies the generic SQL typeBLOB
. -
CLOB
Identifies the generic SQL typeCLOB
. -
REF
Identifies the generic SQL typeREF
. -
DATALINK
Identifies the generic SQL typeDATALINK
. -
BOOLEAN
Identifies the generic SQL typeBOOLEAN
. -
ROWID
Identifies the SQL typeROWID
. -
NCHAR
Identifies the generic SQL typeNCHAR
. -
NVARCHAR
Identifies the generic SQL typeNVARCHAR
. -
LONGNVARCHAR
Identifies the generic SQL typeLONGNVARCHAR
. -
NCLOB
Identifies the generic SQL typeNCLOB
. -
SQLXML
Identifies the generic SQL typeSQLXML
. -
REF_CURSOR
Identifies the generic SQL typeREF_CURSOR
. -
TIME_WITH_TIMEZONE
Identifies the generic SQL typeTIME_WITH_TIMEZONE
. -
TIMESTAMP_WITH_TIMEZONE
Identifies the generic SQL typeTIMESTAMP_WITH_TIMEZONE
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-
getName
Returns theSQLType
name that represents a SQL data type. -
getVendor
Returns the name of the vendor that supports this data type. -
getVendorTypeNumber
Returns the vendor specific type number for the data type.- Specified by:
getVendorTypeNumber
in interfaceSQLType
- Returns:
- An Integer representing the data type. For
JDBCType
, the value will be the same value as inTypes
for the data type.
-
valueOf
Returns theJDBCType
that corresponds to the specifiedTypes
value- Parameters:
type
-Types
value- Returns:
- The
JDBCType
constant - Throws:
IllegalArgumentException
- if this enum type has no constant with the specifiedTypes
value- See Also:
Types
-