Enum Class SqlDbType
- All Implemented Interfaces:
Serializable,Comparable<SqlDbType>,Constable
Provides constants and utility methods for working with database types.
This is basically mapping of
Types with some additional field type values
with option to adding new types later if needed.
This class contains constants for various database types, such as numeric,
character, and date/time types. It also provides methods for checking whether
a given type code represents a specific type, such as a numeric or character
type.- Since:
- 4.13.0
- Author:
- radovanradic
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA type code representing the generic SQL typeARRAY.A type code representing the generic SQL typeBIGINT.A type code representing the generic SQL typeBINARY.A type code representing generic SQL typeBIT.A type code representing the generic SQL typeBLOB.A type code representing the generic SQL typeBOOLEAN.A type code representing the generic SQL typeCHAR.A type code representing the generic SQL typeCLOB.A type code representing the generic SQL typeDATALINK.A type code representing the generic SQL typeDATE.A type code representing the generic SQL typeDECIMAL.A type code representing the generic SQL typeDISTINCT.A type code representing the generic SQL typeDOUBLE.A type code representing the generic SQL typeENUM.A type code representing the generic SQL typeFLOAT.A type code representing the generic SQL typeINTEGER.A type code representing the generic SQL typeJAVA_OBJECT.A type code representing the generic SQL typeJSON.A type code representing the generic SQL typeLONGNVARCHAR.A type code representing the generic SQL typeLONGVARBINARY.A type code representing the generic SQL typeLONGVARCHAR.A type code representing the generic SQL typeNCHAR.A type code representing the generic SQL typeNCLOB.A type code representing the generic SQL valueNULL.A type code representing the generic SQL typeNUMERIC.A type code representing the generic SQL typeNVARCHAR.A type code indicating that the SQL type is SQL dialect-specific and is mapped to a Java object that can be accessed via the methodsResultSet.getObject(int)andPreparedStatement.setObject(int, java.lang.Object, int).A type code representing the generic SQL typeREAL.A type code representing the generic SQL typeREF.A type code representing the generic SQL typeREF CURSOR.A type code representing the generic SQL typeROWID.A type code representing the generic SQL typeSMALLINT.A type code representing the generic SQL typeXML.A type code representing the generic SQL typeSTRUCT.A type code representing the generic SQL typeTIME.A type code representing identifies the generic SQL typeTIME WITH TIMEZONE.A type code representing the generic SQL typeTIMESTAMP.A type code representing the generic SQL typeTIMESTAMP WITH TIMEZONE.A type code representing the generic SQL typeTINYINT.A type code representing the generic SQL typeUUID.A type code representing the generic SQL typeVARBINARY.A type code representing the generic SQL typeVARCHAR. -
Method Summary
Modifier and TypeMethodDescriptionintgetType()Returns the integer representation of the database type.static SqlDbTypeReturns the enum constant of this class with the specified name.static SqlDbType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BIT
A type code representing generic SQL typeBIT.- See Also:
-
TINYINT
A type code representing the generic SQL typeTINYINT.- See Also:
-
SMALLINT
A type code representing the generic SQL typeSMALLINT.- See Also:
-
INTEGER
A type code representing the generic SQL typeINTEGER.- See Also:
-
BIGINT
A type code representing the generic SQL typeBIGINT.- See Also:
-
FLOAT
A type code representing the generic SQL typeFLOAT.- See Also:
-
REAL
A type code representing the generic SQL typeREAL.- See Also:
-
DOUBLE
A type code representing the generic SQL typeDOUBLE.- See Also:
-
NUMERIC
A type code representing the generic SQL typeNUMERIC.- See Also:
-
DECIMAL
A type code representing the generic SQL typeDECIMAL.- See Also:
-
CHAR
A type code representing the generic SQL typeCHAR.- See Also:
-
VARCHAR
A type code representing the generic SQL typeVARCHAR.- See Also:
-
LONGVARCHAR
A type code representing the generic SQL typeLONGVARCHAR. -
DATE
A type code representing the generic SQL typeDATE.- See Also:
-
TIME
A type code representing the generic SQL typeTIME.- See Also:
-
TIMESTAMP
A type code representing the generic SQL typeTIMESTAMP.- See Also:
-
BINARY
A type code representing the generic SQL typeBINARY.- See Also:
-
VARBINARY
A type code representing the generic SQL typeVARBINARY.- See Also:
-
LONGVARBINARY
A type code representing the generic SQL typeLONGVARBINARY. -
NULL
A type code representing the generic SQL valueNULL.- See Also:
-
OTHER
A type code indicating that the SQL type is SQL dialect-specific and is mapped to a Java object that can be accessed via the methodsResultSet.getObject(int)andPreparedStatement.setObject(int, java.lang.Object, int).- See Also:
-
JAVA_OBJECT
A type code representing the generic SQL typeJAVA_OBJECT.- See Also:
-
DISTINCT
A type code representing the generic SQL typeDISTINCT.- See Also:
-
STRUCT
A type code representing the generic SQL typeSTRUCT.- See Also:
-
ARRAY
A type code representing the generic SQL typeARRAY.- See Also:
-
BLOB
A type code representing the generic SQL typeBLOB.- See Also:
-
CLOB
A type code representing the generic SQL typeCLOB.- See Also:
-
REF
A type code representing the generic SQL typeREF.- See Also:
-
DATALINK
A type code representing the generic SQL typeDATALINK.- See Also:
-
BOOLEAN
A type code representing the generic SQL typeBOOLEAN.- See Also:
-
ROWID
A type code representing the generic SQL typeROWID.- See Also:
-
NCHAR
A type code representing the generic SQL typeNCHAR.- See Also:
-
NVARCHAR
A type code representing the generic SQL typeNVARCHAR.- See Also:
-
LONGNVARCHAR
A type code representing the generic SQL typeLONGNVARCHAR. -
NCLOB
A type code representing the generic SQL typeNCLOB.- See Also:
-
SQLXML
A type code representing the generic SQL typeXML.- See Also:
-
REF_CURSOR
A type code representing the generic SQL typeREF CURSOR.- See Also:
-
TIME_WITH_TIMEZONE
A type code representing identifies the generic SQL typeTIME WITH TIMEZONE.- See Also:
-
TIMESTAMP_WITH_TIMEZONE
A type code representing the generic SQL typeTIMESTAMP WITH TIMEZONE.- See Also:
-
UUID
A type code representing the generic SQL typeUUID. It does not have corresponding value inTypes. -
JSON
A type code representing the generic SQL typeJSON. It does not have corresponding value inTypes. -
ENUM
A type code representing the generic SQL typeENUM. It does not have corresponding value inTypes.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum 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 nameNullPointerException- if the argument is null
-
getType
public int getType()Returns the integer representation of the database type.- Returns:
- the type code of the database type
-