public enum JDBCType extends Enum<JDBCType> implements SQLType
Defines the constants that are used to identify generic SQL types, called JDBC types.
SQLType
public static final JDBCType BIT
Identifies the generic SQL type BIT
.
public static final JDBCType TINYINT
Identifies the generic SQL type TINYINT
.
public static final JDBCType SMALLINT
Identifies the generic SQL type SMALLINT
.
public static final JDBCType INTEGER
Identifies the generic SQL type INTEGER
.
public static final JDBCType BIGINT
Identifies the generic SQL type BIGINT
.
public static final JDBCType FLOAT
Identifies the generic SQL type FLOAT
.
public static final JDBCType REAL
Identifies the generic SQL type REAL
.
public static final JDBCType DOUBLE
Identifies the generic SQL type DOUBLE
.
public static final JDBCType NUMERIC
Identifies the generic SQL type NUMERIC
.
public static final JDBCType DECIMAL
Identifies the generic SQL type DECIMAL
.
public static final JDBCType CHAR
Identifies the generic SQL type CHAR
.
public static final JDBCType VARCHAR
Identifies the generic SQL type VARCHAR
.
public static final JDBCType LONGVARCHAR
Identifies the generic SQL type LONGVARCHAR
.
public static final JDBCType DATE
Identifies the generic SQL type DATE
.
public static final JDBCType TIME
Identifies the generic SQL type TIME
.
public static final JDBCType TIMESTAMP
Identifies the generic SQL type TIMESTAMP
.
public static final JDBCType BINARY
Identifies the generic SQL type BINARY
.
public static final JDBCType VARBINARY
Identifies the generic SQL type VARBINARY
.
public static final JDBCType LONGVARBINARY
Identifies the generic SQL type LONGVARBINARY
.
public static final JDBCType NULL
Identifies the generic SQL value NULL
.
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 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 DISTINCT
Identifies the generic SQL type DISTINCT
.
public static final JDBCType STRUCT
Identifies the generic SQL type STRUCT
.
public static final JDBCType ARRAY
Identifies the generic SQL type ARRAY
.
public static final JDBCType BLOB
Identifies the generic SQL type BLOB
.
public static final JDBCType CLOB
Identifies the generic SQL type CLOB
.
public static final JDBCType REF
Identifies the generic SQL type REF
.
public static final JDBCType DATALINK
Identifies the generic SQL type DATALINK
.
public static final JDBCType BOOLEAN
Identifies the generic SQL type BOOLEAN
.
public static final JDBCType ROWID
Identifies the SQL type ROWID
.
public static final JDBCType NCHAR
Identifies the generic SQL type NCHAR
.
public static final JDBCType NVARCHAR
Identifies the generic SQL type NVARCHAR
.
public static final JDBCType LONGNVARCHAR
Identifies the generic SQL type LONGNVARCHAR
.
public static final JDBCType NCLOB
Identifies the generic SQL type NCLOB
.
public static final JDBCType SQLXML
Identifies the generic SQL type SQLXML
.
public static final JDBCType REF_CURSOR
Identifies the generic SQL type REF_CURSOR
.
public static final JDBCType TIME_WITH_TIMEZONE
Identifies the generic SQL type TIME_WITH_TIMEZONE
.
public static final JDBCType TIMESTAMP_WITH_TIMEZONE
Identifies the generic SQL type TIMESTAMP_WITH_TIMEZONE
.
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);
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.)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getName()
Returns the SQLType
name that represents a SQL data type.
public String getVendor()
Returns the name of the vendor that supports this data type.
getVendor
in interface SQLType
public Integer getVendorTypeNumber()
Returns the vendor specific type number for the data type.
getVendorTypeNumber
in interface SQLType
JDBCType
, the value will be the same value as in Types
for the data type.public static JDBCType valueOf(int type)
Returns the JDBCType
that corresponds to the specified Types
value
type
- Types
valueJDBCType
constantIllegalArgumentException
- if this enum type has no constant with the specified Types
valueTypes
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.