- java.lang.Object
- 
- java.lang.Enum<JDBCType>
- 
- java.sql.JDBCType
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<JDBCType>,- 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
 
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description ARRAYIdentifies the generic SQL typeARRAY.BIGINTIdentifies the generic SQL typeBIGINT.BINARYIdentifies the generic SQL typeBINARY.BITIdentifies the generic SQL typeBIT.BLOBIdentifies the generic SQL typeBLOB.BOOLEANIdentifies the generic SQL typeBOOLEAN.CHARIdentifies the generic SQL typeCHAR.CLOBIdentifies the generic SQL typeCLOB.DATALINKIdentifies the generic SQL typeDATALINK.DATEIdentifies the generic SQL typeDATE.DECIMALIdentifies the generic SQL typeDECIMAL.DISTINCTIdentifies the generic SQL typeDISTINCT.DOUBLEIdentifies the generic SQL typeDOUBLE.FLOATIdentifies the generic SQL typeFLOAT.INTEGERIdentifies the generic SQL typeINTEGER.JAVA_OBJECTIndicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.LONGNVARCHARIdentifies the generic SQL typeLONGNVARCHAR.LONGVARBINARYIdentifies the generic SQL typeLONGVARBINARY.LONGVARCHARIdentifies the generic SQL typeLONGVARCHAR.NCHARIdentifies the generic SQL typeNCHAR.NCLOBIdentifies the generic SQL typeNCLOB.NULLIdentifies the generic SQL valueNULL.NUMERICIdentifies the generic SQL typeNUMERIC.NVARCHARIdentifies the generic SQL typeNVARCHAR.OTHERIndicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.REALIdentifies the generic SQL typeREAL.REFIdentifies the generic SQL typeREF.REF_CURSORIdentifies the generic SQL typeREF_CURSOR.ROWIDIdentifies the SQL typeROWID.SMALLINTIdentifies the generic SQL typeSMALLINT.SQLXMLIdentifies the generic SQL typeSQLXML.STRUCTIdentifies the generic SQL typeSTRUCT.TIMEIdentifies the generic SQL typeTIME.TIME_WITH_TIMEZONEIdentifies the generic SQL typeTIME_WITH_TIMEZONE.TIMESTAMPIdentifies the generic SQL typeTIMESTAMP.TIMESTAMP_WITH_TIMEZONEIdentifies the generic SQL typeTIMESTAMP_WITH_TIMEZONE.TINYINTIdentifies the generic SQL typeTINYINT.VARBINARYIdentifies the generic SQL typeVARBINARY.VARCHARIdentifies the generic SQL typeVARCHAR.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Returns theSQLTypename that represents a SQL data type.StringgetVendor()Returns the name of the vendor that supports this data type.IntegergetVendorTypeNumber()Returns the vendor specific type number for the data type.static JDBCTypevalueOf(int type)Returns theJDBCTypethat corresponds to the specifiedTypesvaluestatic JDBCTypevalueOf(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 Detail- 
BITpublic static final JDBCType BIT Identifies the generic SQL typeBIT.
 - 
TINYINTpublic static final JDBCType TINYINT Identifies the generic SQL typeTINYINT.
 - 
SMALLINTpublic static final JDBCType SMALLINT Identifies the generic SQL typeSMALLINT.
 - 
INTEGERpublic static final JDBCType INTEGER Identifies the generic SQL typeINTEGER.
 - 
BIGINTpublic static final JDBCType BIGINT Identifies the generic SQL typeBIGINT.
 - 
FLOATpublic static final JDBCType FLOAT Identifies the generic SQL typeFLOAT.
 - 
REALpublic static final JDBCType REAL Identifies the generic SQL typeREAL.
 - 
DOUBLEpublic static final JDBCType DOUBLE Identifies the generic SQL typeDOUBLE.
 - 
NUMERICpublic static final JDBCType NUMERIC Identifies the generic SQL typeNUMERIC.
 - 
DECIMALpublic static final JDBCType DECIMAL Identifies the generic SQL typeDECIMAL.
 - 
CHARpublic static final JDBCType CHAR Identifies the generic SQL typeCHAR.
 - 
VARCHARpublic static final JDBCType VARCHAR Identifies the generic SQL typeVARCHAR.
 - 
LONGVARCHARpublic static final JDBCType LONGVARCHAR Identifies the generic SQL typeLONGVARCHAR.
 - 
DATEpublic static final JDBCType DATE Identifies the generic SQL typeDATE.
 - 
TIMEpublic static final JDBCType TIME Identifies the generic SQL typeTIME.
 - 
TIMESTAMPpublic static final JDBCType TIMESTAMP Identifies the generic SQL typeTIMESTAMP.
 - 
BINARYpublic static final JDBCType BINARY Identifies the generic SQL typeBINARY.
 - 
VARBINARYpublic static final JDBCType VARBINARY Identifies the generic SQL typeVARBINARY.
 - 
LONGVARBINARYpublic static final JDBCType LONGVARBINARY Identifies the generic SQL typeLONGVARBINARY.
 - 
NULLpublic static final JDBCType NULL Identifies the generic SQL valueNULL.
 - 
OTHERpublic 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.
 - 
JAVA_OBJECTpublic 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.
 - 
DISTINCTpublic static final JDBCType DISTINCT Identifies the generic SQL typeDISTINCT.
 - 
STRUCTpublic static final JDBCType STRUCT Identifies the generic SQL typeSTRUCT.
 - 
ARRAYpublic static final JDBCType ARRAY Identifies the generic SQL typeARRAY.
 - 
BLOBpublic static final JDBCType BLOB Identifies the generic SQL typeBLOB.
 - 
CLOBpublic static final JDBCType CLOB Identifies the generic SQL typeCLOB.
 - 
REFpublic static final JDBCType REF Identifies the generic SQL typeREF.
 - 
DATALINKpublic static final JDBCType DATALINK Identifies the generic SQL typeDATALINK.
 - 
BOOLEANpublic static final JDBCType BOOLEAN Identifies the generic SQL typeBOOLEAN.
 - 
ROWIDpublic static final JDBCType ROWID Identifies the SQL typeROWID.
 - 
NCHARpublic static final JDBCType NCHAR Identifies the generic SQL typeNCHAR.
 - 
NVARCHARpublic static final JDBCType NVARCHAR Identifies the generic SQL typeNVARCHAR.
 - 
LONGNVARCHARpublic static final JDBCType LONGNVARCHAR Identifies the generic SQL typeLONGNVARCHAR.
 - 
NCLOBpublic static final JDBCType NCLOB Identifies the generic SQL typeNCLOB.
 - 
SQLXMLpublic static final JDBCType SQLXML Identifies the generic SQL typeSQLXML.
 - 
REF_CURSORpublic static final JDBCType REF_CURSOR Identifies the generic SQL typeREF_CURSOR.
 - 
TIME_WITH_TIMEZONEpublic static final JDBCType TIME_WITH_TIMEZONE Identifies the generic SQL typeTIME_WITH_TIMEZONE.
 - 
TIMESTAMP_WITH_TIMEZONEpublic static final JDBCType TIMESTAMP_WITH_TIMEZONE Identifies the generic SQL typeTIMESTAMP_WITH_TIMEZONE.
 
- 
 - 
Method Detail- 
valuespublic static JDBCType[] 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 (JDBCType c : JDBCType.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static JDBCType valueOf(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:
- IllegalArgumentException- if this enum type has no constant with the specified name
- NullPointerException- if the argument is null
 
 - 
getNamepublic String getName() Returns theSQLTypename that represents a SQL data type.
 - 
getVendorpublic String getVendor() Returns the name of the vendor that supports this data type.
 - 
getVendorTypeNumberpublic Integer getVendorTypeNumber() Returns the vendor specific type number for the data type.- Specified by:
- getVendorTypeNumberin interface- SQLType
- Returns:
- An Integer representing the data type. For JDBCType, the value will be the same value as inTypesfor the data type.
 
 - 
valueOfpublic static JDBCType valueOf(int type) Returns theJDBCTypethat corresponds to the specifiedTypesvalue- Parameters:
- type-- Typesvalue
- Returns:
- The JDBCTypeconstant
- Throws:
- IllegalArgumentException- if this enum type has no constant with the specified- Typesvalue
- See Also:
- Types
 
 
- 
 
-