public enum JDBCType extends Enum<JDBCType> implements SQLType
Defines the constants that are used to identify generic SQL types, called JDBC types.
SQLType
Enum Constant and Description |
---|
ARRAY
Identifies the generic SQL type
ARRAY . |
BIGINT
Identifies the generic SQL type
BIGINT . |
BINARY
Identifies the generic SQL type
BINARY . |
BIT
Identifies the generic SQL type
BIT . |
BLOB
Identifies the generic SQL type
BLOB . |
BOOLEAN
Identifies the generic SQL type
BOOLEAN . |
CHAR
Identifies the generic SQL type
CHAR . |
CLOB
Identifies the generic SQL type
CLOB . |
DATALINK
Identifies the generic SQL type
DATALINK . |
DATE
Identifies the generic SQL type
DATE . |
DECIMAL
Identifies the generic SQL type
DECIMAL . |
DISTINCT
Identifies the generic SQL type
DISTINCT . |
DOUBLE
Identifies the generic SQL type
DOUBLE . |
FLOAT
Identifies the generic SQL type
FLOAT . |
INTEGER
Identifies the generic SQL type
INTEGER . |
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 type
LONGNVARCHAR . |
LONGVARBINARY
Identifies the generic SQL type
LONGVARBINARY . |
LONGVARCHAR
Identifies the generic SQL type
LONGVARCHAR . |
NCHAR
Identifies the generic SQL type
NCHAR . |
NCLOB
Identifies the generic SQL type
NCLOB . |
NULL
Identifies the generic SQL value
NULL . |
NUMERIC
Identifies the generic SQL type
NUMERIC . |
NVARCHAR
Identifies the generic SQL type
NVARCHAR . |
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 type
REAL . |
REF
Identifies the generic SQL type
REF . |
REF_CURSOR
Identifies the generic SQL type
REF_CURSOR . |
ROWID
Identifies the SQL type
ROWID . |
SMALLINT
Identifies the generic SQL type
SMALLINT . |
SQLXML
Identifies the generic SQL type
SQLXML . |
STRUCT
Identifies the generic SQL type
STRUCT . |
TIME
Identifies the generic SQL type
TIME . |
TIME_WITH_TIMEZONE
Identifies the generic SQL type
TIME_WITH_TIMEZONE . |
TIMESTAMP
Identifies the generic SQL type
TIMESTAMP . |
TIMESTAMP_WITH_TIMEZONE
Identifies the generic SQL type
TIMESTAMP_WITH_TIMEZONE . |
TINYINT
Identifies the generic SQL type
TINYINT . |
VARBINARY
Identifies the generic SQL type
VARBINARY . |
VARCHAR
Identifies the generic SQL type
VARCHAR . |
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the
SQLType 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 the
JDBCType that corresponds to the specified
Types value |
static 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.
|
public static final JDBCType BIT
BIT
.public static final JDBCType TINYINT
TINYINT
.public static final JDBCType SMALLINT
SMALLINT
.public static final JDBCType INTEGER
INTEGER
.public static final JDBCType BIGINT
BIGINT
.public static final JDBCType FLOAT
FLOAT
.public static final JDBCType REAL
REAL
.public static final JDBCType DOUBLE
DOUBLE
.public static final JDBCType NUMERIC
NUMERIC
.public static final JDBCType DECIMAL
DECIMAL
.public static final JDBCType CHAR
CHAR
.public static final JDBCType VARCHAR
VARCHAR
.public static final JDBCType LONGVARCHAR
LONGVARCHAR
.public static final JDBCType DATE
DATE
.public static final JDBCType TIME
TIME
.public static final JDBCType TIMESTAMP
TIMESTAMP
.public static final JDBCType BINARY
BINARY
.public static final JDBCType VARBINARY
VARBINARY
.public static final JDBCType LONGVARBINARY
LONGVARBINARY
.public static final JDBCType NULL
NULL
.public static final JDBCType OTHER
public static final JDBCType JAVA_OBJECT
public static final JDBCType DISTINCT
DISTINCT
.public static final JDBCType STRUCT
STRUCT
.public static final JDBCType ARRAY
ARRAY
.public static final JDBCType BLOB
BLOB
.public static final JDBCType CLOB
CLOB
.public static final JDBCType REF
REF
.public static final JDBCType DATALINK
DATALINK
.public static final JDBCType BOOLEAN
BOOLEAN
.public static final JDBCType ROWID
ROWID
.public static final JDBCType NCHAR
NCHAR
.public static final JDBCType NVARCHAR
NVARCHAR
.public static final JDBCType LONGNVARCHAR
LONGNVARCHAR
.public static final JDBCType NCLOB
NCLOB
.public static final JDBCType SQLXML
SQLXML
.public static final JDBCType REF_CURSOR
REF_CURSOR
.public static final JDBCType TIME_WITH_TIMEZONE
TIME_WITH_TIMEZONE
.public static final JDBCType TIMESTAMP_WITH_TIMEZONE
TIMESTAMP_WITH_TIMEZONE
.public static JDBCType[] values()
for (JDBCType c : JDBCType.values()) System.out.println(c);
public static JDBCType valueOf(String name)
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()
SQLType
name that represents a SQL data type.public String getVendor()
public Integer getVendorTypeNumber()
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)
JDBCType
that corresponds to the specified
Types
valuetype
- Types
valueJDBCType
constantIllegalArgumentException
- if this enum type has no constant with
the specified Types
valueTypes
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2022, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.