Enum JdbcType

  • All Implemented Interfaces:
    Serializable, Comparable<JdbcType>, ColumnType

    public enum JdbcType
    extends Enum<JdbcType>
    implements ColumnType

    The class that defines the constants that are used to identify generic SQL types, called JDBC types. The int values are identical from java.sql.Types

    Since:
    0.6.0
    Author:
    Alisson Gomes
    See Also:
    Types
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ARRAY
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type ARRAY.
      BIGINT
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIGINT.
      BINARY
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BINARY.
      BIT
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIT.
      BLOB
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BLOB.
      BOOLEAN
      The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL type BOOLEAN.
      CHAR
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CHAR.
      CLOB
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CLOB.
      DATALINK
      The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL type DATALINK.
      DATE
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DATE.
      DECIMAL
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DECIMAL.
      DISTINCT
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DISTINCT.
      DOUBLE
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DOUBLE.
      FLOAT
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type FLOAT.
      INTEGER
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type INTEGER.
      JAVA_OBJECT
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type JAVA_OBJECT.
      LONGNVARCHAR
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGNVARCHAR .
      LONGVARBINARY
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARBINARY.
      LONGVARCHAR
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARCHAR.
      NCHAR
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NCHAR
      NCLOB
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NCLOB.
      NULL
      The constant in the Java programming language that identifies the generic SQL value NULL.
      NUMERIC
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NUMERIC.
      NVARCHAR
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NVARCHAR.
      OTHER
      The constant in the Java programming language that 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
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REAL.
      REF
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REF.
      REF_CURSOR
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REF CURSOR.
      ROWID
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type ROWID
      SMALLINT
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type SMALLINT.
      SQLXML
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type XML.
      STRUCT
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type STRUCT.
      TIME
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIME.
      TIME_WITH_TIMEZONE
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIME WITH TIMEZONE.
      TIMESTAMP
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIMESTAMP.
      TIMESTAMP_WITH_TIMEZONE
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIMESTAMP WITH TIMEZONE.
      TINYINT
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TINYINT.
      VARBINARY
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARBINARY.
      VARCHAR
      The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARCHAR.
    • Enum Constant Detail

      • BIT

        public static final JdbcType BIT

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIT.

      • TINYINT

        public static final JdbcType TINYINT

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TINYINT.

      • SMALLINT

        public static final JdbcType SMALLINT

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type SMALLINT.

      • INTEGER

        public static final JdbcType INTEGER

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type INTEGER.

      • BIGINT

        public static final JdbcType BIGINT

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIGINT.

      • FLOAT

        public static final JdbcType FLOAT

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type FLOAT.

      • REAL

        public static final JdbcType REAL

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REAL.

      • DOUBLE

        public static final JdbcType DOUBLE

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DOUBLE.

      • NUMERIC

        public static final JdbcType NUMERIC

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NUMERIC.

      • DECIMAL

        public static final JdbcType DECIMAL

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DECIMAL.

      • CHAR

        public static final JdbcType CHAR

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CHAR.

      • VARCHAR

        public static final JdbcType VARCHAR

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARCHAR.

      • LONGVARCHAR

        public static final JdbcType LONGVARCHAR

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARCHAR.

      • DATE

        public static final JdbcType DATE

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DATE.

      • TIME

        public static final JdbcType TIME

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIME.

      • TIMESTAMP

        public static final JdbcType TIMESTAMP

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIMESTAMP.

      • BINARY

        public static final JdbcType BINARY

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BINARY.

      • VARBINARY

        public static final JdbcType VARBINARY

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARBINARY.

      • LONGVARBINARY

        public static final JdbcType LONGVARBINARY

        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARBINARY.

      • NULL

        public static final JdbcType NULL

        The constant in the Java programming language that identifies the generic SQL value NULL.

      • OTHER

        public static final JdbcType OTHER
        The constant in the Java programming language that 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
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type JAVA_OBJECT.
        Since:
        1.2
      • DISTINCT

        public static final JdbcType DISTINCT
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DISTINCT.
        Since:
        1.2
      • STRUCT

        public static final JdbcType STRUCT
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type STRUCT.
        Since:
        1.2
      • ARRAY

        public static final JdbcType ARRAY
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type ARRAY.
        Since:
        1.2
      • BLOB

        public static final JdbcType BLOB
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BLOB.
        Since:
        1.2
      • CLOB

        public static final JdbcType CLOB
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CLOB.
        Since:
        1.2
      • REF

        public static final JdbcType REF
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REF.
        Since:
        1.2
      • DATALINK

        public static final JdbcType DATALINK
        The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL type DATALINK.
        Since:
        1.4
      • BOOLEAN

        public static final JdbcType BOOLEAN
        The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL type BOOLEAN.
        Since:
        1.4
      • ROWID

        public static final JdbcType ROWID
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type ROWID
        Since:
        1.6
      • NCHAR

        public static final JdbcType NCHAR
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NCHAR
        Since:
        1.6
      • NVARCHAR

        public static final JdbcType NVARCHAR
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NVARCHAR.
        Since:
        1.6
      • LONGNVARCHAR

        public static final JdbcType LONGNVARCHAR
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGNVARCHAR .
        Since:
        1.6
      • NCLOB

        public static final JdbcType NCLOB
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NCLOB.
        Since:
        1.6
      • SQLXML

        public static final JdbcType SQLXML
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type XML.
        Since:
        1.6
      • REF_CURSOR

        public static final JdbcType REF_CURSOR
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REF CURSOR.
        Since:
        1.8
      • TIME_WITH_TIMEZONE

        public static final JdbcType TIME_WITH_TIMEZONE
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIME WITH TIMEZONE.
        Since:
        1.8
      • TIMESTAMP_WITH_TIMEZONE

        public static final JdbcType TIMESTAMP_WITH_TIMEZONE
        The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIMESTAMP WITH TIMEZONE.
        Since:
        1.8
    • Method Detail

      • values

        public 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
      • valueOf

        public 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
      • isBlob

        public boolean isBlob()
        Specified by:
        isBlob in interface ColumnType
      • isClob

        public boolean isClob()
        Specified by:
        isClob in interface ColumnType
      • isDate

        public boolean isDate()
        Specified by:
        isDate in interface ColumnType
      • isTime

        public boolean isTime()
        Specified by:
        isTime in interface ColumnType
      • valueOf

        public static ColumnType valueOf​(int jdbcTypeValue)
        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:
        jdbcTypeValue - 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