Enum Class JDBCType

java.lang.Object
java.lang.Enum<JDBCType>
java.sql.JDBCType
All Implemented Interfaces:
Serializable,Comparable<JDBCType>,Constable,SQLType

public enumJDBCTypeextendsEnum<JDBCType>implementsSQLType

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

Since:
1.8
See Also:
  • Nested Class Summary

    Nested classes/interfaces declared in class java.lang.Enum

    Enum.EnumDesc<E extendsEnum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Identifies the generic SQL typeARRAY.
    Identifies the generic SQL typeBIGINT.
    Identifies the generic SQL typeBINARY.
    Identifies the generic SQL typeBIT.
    Identifies the generic SQL typeBLOB.
    Identifies the generic SQL typeBOOLEAN.
    Identifies the generic SQL typeCHAR.
    Identifies the generic SQL typeCLOB.
    Identifies the generic SQL typeDATALINK.
    Identifies the generic SQL typeDATE.
    Identifies the generic SQL typeDECIMAL.
    Identifies the generic SQL typeDISTINCT.
    Identifies the generic SQL typeDOUBLE.
    Identifies the generic SQL typeFLOAT.
    Identifies the generic SQL typeINTEGER.
    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.
    Identifies the generic SQL typeLONGNVARCHAR.
    Identifies the generic SQL typeLONGVARBINARY.
    Identifies the generic SQL typeLONGVARCHAR.
    Identifies the generic SQL typeNCHAR.
    Identifies the generic SQL typeNCLOB.
    Identifies the generic SQL valueNULL.
    Identifies the generic SQL typeNUMERIC.
    Identifies the generic SQL typeNVARCHAR.
    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.
    Identifies the generic SQL typeREAL.
    Identifies the generic SQL typeREF.
    Identifies the generic SQL typeREF_CURSOR.
    Identifies the SQL typeROWID.
    Identifies the generic SQL typeSMALLINT.
    Identifies the generic SQL typeSQLXML.
    Identifies the generic SQL typeSTRUCT.
    Identifies the generic SQL typeTIME.
    Identifies the generic SQL typeTIME_WITH_TIMEZONE.
    Identifies the generic SQL typeTIMESTAMP.
    Identifies the generic SQL typeTIMESTAMP_WITH_TIMEZONE.
    Identifies the generic SQL typeTINYINT.
    Identifies the generic SQL typeVARBINARY.
    Identifies the generic SQL typeVARCHAR.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns theSQLType name that represents a SQL data type.
    Returns the name of the vendor that supports this data type.
    Returns the vendor specific type number for the data type.
    staticJDBCType
    valueOf(int type)
    Returns theJDBCType that corresponds to the specifiedTypes value
    staticJDBCType
    Returns the enum constant of this class with the specified name.
    staticJDBCType[]
    Returns an array containing the constants of this enum class, inthe order they are declared.

    Methods declared in class java.lang.Object

    getClass,notify,notifyAll,wait,wait,wait
  • Enum Constant Details

    • BIT

      public static final JDBCType BIT
      Identifies the generic SQL typeBIT.
    • TINYINT

      public static final JDBCType TINYINT
      Identifies the generic SQL typeTINYINT.
    • SMALLINT

      public static final JDBCType SMALLINT
      Identifies the generic SQL typeSMALLINT.
    • INTEGER

      public static final JDBCType INTEGER
      Identifies the generic SQL typeINTEGER.
    • BIGINT

      public static final JDBCType BIGINT
      Identifies the generic SQL typeBIGINT.
    • FLOAT

      public static final JDBCType FLOAT
      Identifies the generic SQL typeFLOAT.
    • REAL

      public static final JDBCType REAL
      Identifies the generic SQL typeREAL.
    • DOUBLE

      public static final JDBCType DOUBLE
      Identifies the generic SQL typeDOUBLE.
    • NUMERIC

      public static final JDBCType NUMERIC
      Identifies the generic SQL typeNUMERIC.
    • DECIMAL

      public static final JDBCType DECIMAL
      Identifies the generic SQL typeDECIMAL.
    • CHAR

      public static final JDBCType CHAR
      Identifies the generic SQL typeCHAR.
    • VARCHAR

      public static final JDBCType VARCHAR
      Identifies the generic SQL typeVARCHAR.
    • LONGVARCHAR

      public static final JDBCType LONGVARCHAR
      Identifies the generic SQL typeLONGVARCHAR.
    • DATE

      public static final JDBCType DATE
      Identifies the generic SQL typeDATE.
    • TIME

      public static final JDBCType TIME
      Identifies the generic SQL typeTIME.
    • TIMESTAMP

      public static final JDBCType TIMESTAMP
      Identifies the generic SQL typeTIMESTAMP.
    • BINARY

      public static final JDBCType BINARY
      Identifies the generic SQL typeBINARY.
    • VARBINARY

      public static final JDBCType VARBINARY
      Identifies the generic SQL typeVARBINARY.
    • LONGVARBINARY

      public static final JDBCType LONGVARBINARY
      Identifies the generic SQL typeLONGVARBINARY.
    • NULL

      public static final JDBCType NULL
      Identifies the generic SQL valueNULL.
    • OTHER

      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.
    • JAVA_OBJECT

      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.
    • DISTINCT

      public static final JDBCType DISTINCT
      Identifies the generic SQL typeDISTINCT.
    • STRUCT

      public static final JDBCType STRUCT
      Identifies the generic SQL typeSTRUCT.
    • ARRAY

      public static final JDBCType ARRAY
      Identifies the generic SQL typeARRAY.
    • BLOB

      public static final JDBCType BLOB
      Identifies the generic SQL typeBLOB.
    • CLOB

      public static final JDBCType CLOB
      Identifies the generic SQL typeCLOB.
    • REF

      public static final JDBCType REF
      Identifies the generic SQL typeREF.
    • DATALINK

      public static final JDBCType DATALINK
      Identifies the generic SQL typeDATALINK.
    • BOOLEAN

      public static final JDBCType BOOLEAN
      Identifies the generic SQL typeBOOLEAN.
    • ROWID

      public static final JDBCType ROWID
      Identifies the SQL typeROWID.
    • NCHAR

      public static final JDBCType NCHAR
      Identifies the generic SQL typeNCHAR.
    • NVARCHAR

      public static final JDBCType NVARCHAR
      Identifies the generic SQL typeNVARCHAR.
    • LONGNVARCHAR

      public static final JDBCType LONGNVARCHAR
      Identifies the generic SQL typeLONGNVARCHAR.
    • NCLOB

      public static final JDBCType NCLOB
      Identifies the generic SQL typeNCLOB.
    • SQLXML

      public static final JDBCType SQLXML
      Identifies the generic SQL typeSQLXML.
    • REF_CURSOR

      public static final JDBCType REF_CURSOR
      Identifies the generic SQL typeREF_CURSOR.
    • TIME_WITH_TIMEZONE

      public static final JDBCType TIME_WITH_TIMEZONE
      Identifies the generic SQL typeTIME_WITH_TIMEZONE.
    • TIMESTAMP_WITH_TIMEZONE

      public static final JDBCType TIMESTAMP_WITH_TIMEZONE
      Identifies the generic SQL typeTIMESTAMP_WITH_TIMEZONE.
  • Method Details

    • values

      public static JDBCType[] values()
      Returns an array containing the constants of this enum class, inthe order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JDBCType valueOf(String name)
      Returns the enum constant of this class with the specified name.The string must matchexactly an identifier used to declare anenum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • getName

      public String getName()
      Returns theSQLType name that represents a SQL data type.
      Specified by:
      getName in interface SQLType
      Returns:
      The name of thisSQLType.
    • getVendor

      public 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 JDBCType.
    • getVendorTypeNumber

      public 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. ForJDBCType, the value will be the same value as inTypes for the data type.
    • valueOf

      public static JDBCType valueOf(int type)
      Returns theJDBCType that corresponds to the specifiedTypes value
      Parameters:
      type -Types value
      Returns:
      TheJDBCType constant
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specifiedTypes value
      See Also: