Class SqlTypes
- java.lang.Object
-
- org.hibernate.type.SqlTypes
-
public class SqlTypes extends Object
Defines a list of constant type codes used to identify generic SQL types. This is an extension of the standard JDBC-definedTypes
, defining additional type codes for types that Hibernate supports but which are not recognized by the JDBC specification.Each of these type codes represents an abstraction over a family of similar types in different databases. It's the job of the SQL
Dialect
, and in particular of the methodcolumnType()
, to interpret these type codes as column type names.A type code is often used as a key to obtain a
JdbcType
, by implementors ofJavaType.getRecommendedJdbcType(org.hibernate.type.descriptor.jdbc.JdbcTypeIndicators)
, or when the@JdbcTypeCode
annotation is used, for example.A type code may also be used as a key to obtain a dialect-specific
DdlType
for the purposes of generating DDL.- See Also:
JdbcTypeRegistry
,DdlTypeRegistry
-
-
Field Summary
Fields Modifier and Type Field Description static int
ARRAY
A type code representing the generic SQL typeARRAY
.static int
BIGINT
A type code representing the generic SQL typeBIGINT
.static int
BINARY
A type code representing the generic SQL typeBINARY
.static int
BIT
A type code representing generic SQL typeBIT
.static int
BLOB
A type code representing the generic SQL typeBLOB
.static int
BOOLEAN
A type code representing the generic SQL typeBOOLEAN
.static int
CHAR
A type code representing the generic SQL typeCHAR
.static int
CLOB
A type code representing the generic SQL typeCLOB
.static int
DATALINK
A type code representing the generic SQL typeDATALINK
.static int
DATE
A type code representing the generic SQL typeDATE
.static int
DECIMAL
A type code representing the generic SQL typeDECIMAL
.static int
DISTINCT
A type code representing the generic SQL typeDISTINCT
.static int
DOUBLE
A type code representing the generic SQL typeDOUBLE
.static int
DURATION
A type code representing a "virtual mapping" of Duration.static int
ENUM
A type code representing a SQLENUM
type for databases likeMySQL
whereENUM
types do not have names.static int
FLOAT
A type code representing the generic SQL typeFLOAT
.static int
GEOGRAPHY
A type code representing the generic SQL typeGEOGRAPHY
.static int
GEOMETRY
A type code representing the generic SQL typeGEOMETRY
.static int
INET
A type code representing the generic SQL typeINET
for IPv4 or IPv6 addresses.static int
INSTANT
A type code representing a "virtual mapping" of Instant as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.static int
INTEGER
A type code representing the generic SQL typeINTEGER
.static int
INTERVAL_SECOND
A type code representing the generic SQL typeINTERVAL SECOND
for a temporal duration given terms of seconds and fractional seconds.static int
JAVA_OBJECT
A type code representing the generic SQL typeJAVA_OBJECT
.static int
JSON
A type code representing the generic SQL typeJSON
.static int
LOCAL_DATE
A type code representing a "virtual mapping" of LocalDate as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.static int
LOCAL_DATE_TIME
A type code representing a "virtual mapping" of LocalDateTime as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.static int
LOCAL_TIME
A type code representing a "virtual mapping" of LocalTime as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.static int
LONG32NVARCHAR
static int
LONG32VARBINARY
static int
LONG32VARCHAR
static int
LONGNVARCHAR
A type code representing the generic SQL typeLONGNVARCHAR
.static int
LONGVARBINARY
A type code representing the generic SQL typeLONGVARBINARY
.static int
LONGVARCHAR
A type code representing the generic SQL typeLONGVARCHAR
.static int
MATERIALIZED_BLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeMATERIALIZED_BLOB
.static int
MATERIALIZED_CLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeMATERIALIZED_CLOB
.static int
MATERIALIZED_NCLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeMATERIALIZED_NCLOB
.static int
NAMED_ENUM
A type code representing a SQLENUM
type for databases likePostgreSQL
whereENUM
types must have names.static int
NAMED_ORDINAL_ENUM
A type code representing a SQLENUM
type for databases likePostgreSQL
whereENUM
types must have names.static int
NCHAR
A type code representing the generic SQL typeNCHAR
.static int
NCLOB
A type code representing the generic SQL typeNCLOB
.static int
NULL
A type code representing the generic SQL valueNULL
.static int
NUMERIC
A type code representing the generic SQL typeNUMERIC
.static int
NVARCHAR
A type code representing the generic SQL typeNVARCHAR
.static int
OFFSET_DATE_TIME
A type code representing a "virtual mapping" of OffsetDateTime as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.static int
OFFSET_TIME
A type code representing a "virtual mapping" of OffsetTime as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.static int
ORDINAL_ENUM
A type code representing a SQLENUM
type for databases likeMySQL
whereENUM
types do not have names.static int
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)
.static int
POINT
A type code representing the generic SQL typePOINT
.static int
REAL
A type code representing the generic SQL typeREAL
.static int
REF
A type code representing the generic SQL typeREF
.static int
REF_CURSOR
A type code representing the generic SQL typeREF CURSOR
.static int
ROWID
A type code representing the generic SQL typeROWID
.static int
SMALLINT
A type code representing the generic SQL typeSMALLINT
.static int
SQLXML
A type code representing the generic SQL typeXML
.static int
STRUCT
A type code representing the generic SQL typeSTRUCT
.static int
TABLE
A type code representing an Oracle-style nested table.static int
TIME
A type code representing the generic SQL typeTIME
.static int
TIME_UTC
A type code representing the generic SQL typeTIME
, where the value is given in UTC, instead of in the system or JDBC timezone.static int
TIME_WITH_TIMEZONE
A type code representing identifies the generic SQL typeTIME WITH TIMEZONE
.static int
TIMESTAMP
A type code representing the generic SQL typeTIMESTAMP
.static int
TIMESTAMP_UTC
A type code representing the generic SQL typeTIMESTAMP
, where the value is given in UTC, instead of in the system or JDBC timezone.static int
TIMESTAMP_WITH_TIMEZONE
A type code representing the generic SQL typeTIMESTAMP WITH TIMEZONE
.static int
TINYINT
A type code representing the generic SQL typeTINYINT
.static int
UUID
A type code representing the generic SQL typeUUID
.static int
VARBINARY
A type code representing the generic SQL typeVARBINARY
.static int
VARCHAR
A type code representing the generic SQL typeVARCHAR
.static int
VECTOR
A type code representing anembedding vector
type for databases likePostgreSQL
that have special extensions.static int
ZONED_DATE_TIME
A type code representing a "virtual mapping" of ZonedDateTime as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
hasDatePart(int typeCode)
Does the given typecode represent a SQL date or timestamp type?static boolean
hasTimePart(int typeCode)
Does the given typecode represent a SQL time or timestamp type?static boolean
isBinaryType(int typeCode)
Does the given JDBC type code represent some sort of variable-length binary string or BLOB type?static boolean
isCharacterOrClobType(int typeCode)
Does the given JDBC type code represent some sort of character string type?static boolean
isCharacterType(int typeCode)
Does the given JDBC type code represent some sort of character string type?static boolean
isDurationType(int typeCode)
Does the given typecode represent aduration
type?static boolean
isEnumType(int typeCode)
static boolean
isFloatOrRealOrDouble(int typeCode)
Does the given typecode represent a SQL floating point type?static boolean
isIntegral(int typeCode)
Does the given typecode represent a SQL integer type?static boolean
isIntervalType(int typeCode)
Does the given typecode represent a SQLinterval
type?static boolean
isNumericOrDecimal(int typeCode)
Does the given typecode represent one of the two SQL decimal types?static boolean
isNumericType(int typeCode)
Does the given JDBC type code represent some sort of numeric type?static boolean
isSmallOrTinyInt(int typeCode)
static boolean
isSpatialType(int typeCode)
Does the typecode represent a spatial (Geometry or Geography) type.static boolean
isStringType(int typeCode)
Is this a type with a length, that is, is it some kind of character string or binary string?static boolean
isTemporalType(int typeCode)
Does the given typecode represent a SQL date, time, or timestamp type?static boolean
isVarbinaryType(int typeCode)
Does the given JDBC type code represent some sort of variable-length binary string type?static boolean
isVarcharType(int typeCode)
Does the given JDBC type code represent some sort of variable-length character string type?
-
-
-
Field Detail
-
BIT
public static final int BIT
A type code representing generic SQL typeBIT
.- See Also:
Types.BIT
, Constant Field Values
-
TINYINT
public static final int TINYINT
A type code representing the generic SQL typeTINYINT
.- See Also:
Types.TINYINT
,TinyIntJdbcType
, Constant Field Values
-
SMALLINT
public static final int SMALLINT
A type code representing the generic SQL typeSMALLINT
.- See Also:
Types.SMALLINT
,SmallIntJdbcType
, Constant Field Values
-
INTEGER
public static final int INTEGER
A type code representing the generic SQL typeINTEGER
.- See Also:
Types.INTEGER
,IntegerJdbcType
, Constant Field Values
-
BIGINT
public static final int BIGINT
A type code representing the generic SQL typeBIGINT
.- See Also:
Types.BIGINT
,BigIntJdbcType
, Constant Field Values
-
FLOAT
public static final int FLOAT
A type code representing the generic SQL typeFLOAT
.- See Also:
Types.FLOAT
,FloatJdbcType
, Constant Field Values
-
REAL
public static final int REAL
A type code representing the generic SQL typeREAL
.- See Also:
Types.REAL
,RealJdbcType
, Constant Field Values
-
DOUBLE
public static final int DOUBLE
A type code representing the generic SQL typeDOUBLE
.- See Also:
Types.DOUBLE
,DoubleJdbcType
, Constant Field Values
-
NUMERIC
public static final int NUMERIC
A type code representing the generic SQL typeNUMERIC
.- See Also:
Types.NUMERIC
,NumericJdbcType
, Constant Field Values
-
DECIMAL
public static final int DECIMAL
A type code representing the generic SQL typeDECIMAL
.- See Also:
Types.DECIMAL
,DecimalJdbcType
, Constant Field Values
-
CHAR
public static final int CHAR
A type code representing the generic SQL typeCHAR
.- See Also:
Types.CHAR
,CharJdbcType
, Constant Field Values
-
VARCHAR
public static final int VARCHAR
A type code representing the generic SQL typeVARCHAR
.- See Also:
Types.VARCHAR
,VarcharJdbcType
, Constant Field Values
-
LONGVARCHAR
public static final int LONGVARCHAR
A type code representing the generic SQL typeLONGVARCHAR
.Interpreted by Hibernate as a
VARCHAR
-like type large enough to hold a string of maximum lengthLength.LONG
.Apart from the larger default column length, this type code is treated as a synonym for
VARCHAR
.
-
LONG32VARCHAR
public static final int LONG32VARCHAR
A type code used internally by the HibernateDialect
to identify aVARCHAR
-like type large enough to hold any Java string.In principle, the type must accommodate strings of length 2147483647, though this is not an absolutely hard requirement, since such large strings do not occur in practice.
- See Also:
Length.LONG32
, Constant Field Values
-
DATE
public static final int DATE
A type code representing the generic SQL typeDATE
.- See Also:
Types.DATE
,DateJdbcType
, Constant Field Values
-
TIME
public static final int TIME
A type code representing the generic SQL typeTIME
.- See Also:
Types.TIME
,TimeJdbcType
, Constant Field Values
-
TIMESTAMP
public static final int TIMESTAMP
A type code representing the generic SQL typeTIMESTAMP
.- See Also:
Types.TIMESTAMP
,TimestampJdbcType
, Constant Field Values
-
BINARY
public static final int BINARY
A type code representing the generic SQL typeBINARY
.- See Also:
Types.BINARY
,BinaryJdbcType
, Constant Field Values
-
VARBINARY
public static final int VARBINARY
A type code representing the generic SQL typeVARBINARY
.- See Also:
Types.VARBINARY
,VarbinaryJdbcType
, Constant Field Values
-
LONGVARBINARY
public static final int LONGVARBINARY
A type code representing the generic SQL typeLONGVARBINARY
.Interpreted by Hibernate as a
VARBINARY
-like type large enough to hold a byte array of maximum lengthLength.LONG
.Apart from the larger default column length, this type code is treated as a synonym for
VARBINARY
.
-
LONG32VARBINARY
public static final int LONG32VARBINARY
A type code used by the Hibernate SQL dialect to identify aVARBINARY
-like type large enough to hold any Java byte array.In principle, the type must accommodate arrays of length 2147483647, though this is not an absolutely hard requirement, since such large arrays do not occur in practice.
- See Also:
Length.LONG32
, Constant Field Values
-
NULL
public static final int NULL
A type code representing the generic SQL valueNULL
.- See Also:
Types.NULL
, Constant Field Values
-
OTHER
public static final int 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:
Types.OTHER
, Constant Field Values
-
JAVA_OBJECT
public static final int JAVA_OBJECT
A type code representing the generic SQL typeJAVA_OBJECT
.- See Also:
Types.JAVA_OBJECT
,ObjectJdbcType
, Constant Field Values
-
DISTINCT
public static final int DISTINCT
A type code representing the generic SQL typeDISTINCT
.- See Also:
Types.DISTINCT
, Constant Field Values
-
STRUCT
public static final int STRUCT
A type code representing the generic SQL typeSTRUCT
.- See Also:
Types.STRUCT
, Constant Field Values
-
ARRAY
public static final int ARRAY
A type code representing the generic SQL typeARRAY
.- See Also:
Types.ARRAY
,ArrayJdbcType
, Constant Field Values
-
TABLE
public static final int TABLE
A type code representing an Oracle-style nested table.- See Also:
OracleNestedTableJdbcType
, Constant Field Values
-
BLOB
public static final int BLOB
A type code representing the generic SQL typeBLOB
.- See Also:
Types.BLOB
,BlobJdbcType
, Constant Field Values
-
CLOB
public static final int CLOB
A type code representing the generic SQL typeCLOB
.- See Also:
Types.CLOB
,ClobJdbcType
, Constant Field Values
-
REF
public static final int REF
A type code representing the generic SQL typeREF
.- See Also:
Types.REF
, Constant Field Values
-
DATALINK
public static final int DATALINK
A type code representing the generic SQL typeDATALINK
.- See Also:
Types.DATALINK
, Constant Field Values
-
BOOLEAN
public static final int BOOLEAN
A type code representing the generic SQL typeBOOLEAN
.
-
ROWID
public static final int ROWID
A type code representing the generic SQL typeROWID
.- See Also:
Types.ROWID
, Constant Field Values
-
NCHAR
public static final int NCHAR
A type code representing the generic SQL typeNCHAR
.- See Also:
Types.NCHAR
,NCharJdbcType
, Constant Field Values
-
NVARCHAR
public static final int NVARCHAR
A type code representing the generic SQL typeNVARCHAR
.- See Also:
Types.NVARCHAR
,NVarcharJdbcType
, Constant Field Values
-
LONGNVARCHAR
public static final int LONGNVARCHAR
A type code representing the generic SQL typeLONGNVARCHAR
.Interpreted by Hibernate as an
NVARCHAR
-like type large enough to hold a string of maximum lengthLength.LONG
.Apart from the larger default column length, this type code is treated as a synonym for
NVARCHAR
.
-
LONG32NVARCHAR
public static final int LONG32NVARCHAR
A type code used internally by the HibernateDialect
to identify anNVARCHAR
-like type large enough to hold any Java string.In principle, the type must accommodate strings of length 2147483647, though this is not an absolutely hard requirement, since such large strings do not occur in practice.
- See Also:
Length.LONG32
, Constant Field Values
-
NCLOB
public static final int NCLOB
A type code representing the generic SQL typeNCLOB
.- See Also:
Types.NCLOB
,NClobJdbcType
, Constant Field Values
-
SQLXML
public static final int SQLXML
A type code representing the generic SQL typeXML
.- See Also:
Types.SQLXML
,XmlJdbcType
, Constant Field Values
-
REF_CURSOR
public static final int REF_CURSOR
A type code representing the generic SQL typeREF CURSOR
.- See Also:
Types.REF_CURSOR
, Constant Field Values
-
TIME_WITH_TIMEZONE
public static final int TIME_WITH_TIMEZONE
A type code representing identifies the generic SQL typeTIME WITH TIMEZONE
.- See Also:
Types.TIME_WITH_TIMEZONE
, Constant Field Values
-
TIMESTAMP_WITH_TIMEZONE
public static final int TIMESTAMP_WITH_TIMEZONE
A type code representing the generic SQL typeTIMESTAMP WITH TIMEZONE
.
-
UUID
public static final int UUID
A type code representing the generic SQL typeUUID
.
-
JSON
public static final int JSON
A type code representing the generic SQL typeJSON
.- See Also:
JsonJdbcType
, Constant Field Values
-
INET
public static final int INET
A type code representing the generic SQL typeINET
for IPv4 or IPv6 addresses.- See Also:
PostgreSQLInetJdbcType
, Constant Field Values
-
TIMESTAMP_UTC
public static final int TIMESTAMP_UTC
A type code representing the generic SQL typeTIMESTAMP
, where the value is given in UTC, instead of in the system or JDBC timezone.
-
MATERIALIZED_BLOB
@Internal public static final int MATERIALIZED_BLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeMATERIALIZED_BLOB
. This type is used when JDBC access should useVARBINARY
semantics, but theDdlType
should be based onBLOB
.- See Also:
- Constant Field Values
-
MATERIALIZED_CLOB
@Internal public static final int MATERIALIZED_CLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeMATERIALIZED_CLOB
. This type is used when JDBC access should useVARCHAR
semantics, but theDdlType
should be based onCLOB
.- See Also:
- Constant Field Values
-
MATERIALIZED_NCLOB
@Internal public static final int MATERIALIZED_NCLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeMATERIALIZED_NCLOB
. This type is used when JDBC access should useNVARCHAR
semantics, but theDdlType
should be based onNCLOB
.- See Also:
- Constant Field Values
-
TIME_UTC
public static final int TIME_UTC
A type code representing the generic SQL typeTIME
, where the value is given in UTC, instead of in the system or JDBC timezone.
-
INSTANT
public static final int INSTANT
A type code representing a "virtual mapping" of Instant as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.- See Also:
InstantJdbcType
, Constant Field Values
-
LOCAL_DATE_TIME
public static final int LOCAL_DATE_TIME
A type code representing a "virtual mapping" of LocalDateTime as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.- See Also:
LocalDateTimeJdbcType
, Constant Field Values
-
LOCAL_DATE
public static final int LOCAL_DATE
A type code representing a "virtual mapping" of LocalDate as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.- See Also:
LocalDateJdbcType
, Constant Field Values
-
LOCAL_TIME
public static final int LOCAL_TIME
A type code representing a "virtual mapping" of LocalTime as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.- See Also:
LocalTimeJdbcType
, Constant Field Values
-
OFFSET_DATE_TIME
public static final int OFFSET_DATE_TIME
A type code representing a "virtual mapping" of OffsetDateTime as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.- See Also:
OffsetDateTimeJdbcType
, Constant Field Values
-
OFFSET_TIME
public static final int OFFSET_TIME
A type code representing a "virtual mapping" of OffsetTime as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.- See Also:
OffsetTimeJdbcType
, Constant Field Values
-
ZONED_DATE_TIME
public static final int ZONED_DATE_TIME
A type code representing a "virtual mapping" of ZonedDateTime as a JDBC type using ResultSet.getObject(int) and PreparedStatement.setObject(int, java.lang.Object, int) which JDBC requires compliant drivers to support.- See Also:
ZonedDateTimeJdbcType
, Constant Field Values
-
DURATION
public static final int DURATION
A type code representing a "virtual mapping" of Duration.- See Also:
Types.NUMERIC
,DurationJdbcType
, Constant Field Values
-
INTERVAL_SECOND
public static final int INTERVAL_SECOND
A type code representing the generic SQL typeINTERVAL SECOND
for a temporal duration given terms of seconds and fractional seconds.
-
GEOMETRY
public static final int GEOMETRY
A type code representing the generic SQL typeGEOMETRY
.- See Also:
- Constant Field Values
-
POINT
public static final int POINT
A type code representing the generic SQL typePOINT
.- See Also:
- Constant Field Values
-
GEOGRAPHY
public static final int GEOGRAPHY
A type code representing the generic SQL typeGEOGRAPHY
.- Since:
- 6.0.1
- See Also:
- Constant Field Values
-
ENUM
public static final int ENUM
A type code representing a SQLENUM
type for databases likeMySQL
whereENUM
types do not have names.- Since:
- 6.3
- See Also:
EnumJdbcType
, Constant Field Values
-
NAMED_ENUM
public static final int NAMED_ENUM
A type code representing a SQLENUM
type for databases likePostgreSQL
whereENUM
types must have names.- Since:
- 6.3
- See Also:
PostgreSQLEnumJdbcType
, Constant Field Values
-
ORDINAL_ENUM
public static final int ORDINAL_ENUM
A type code representing a SQLENUM
type for databases likeMySQL
whereENUM
types do not have names. Enum values are ordered by ordinal.- Since:
- 6.5
- See Also:
OrdinalEnumJdbcType
, Constant Field Values
-
NAMED_ORDINAL_ENUM
public static final int NAMED_ORDINAL_ENUM
A type code representing a SQLENUM
type for databases likePostgreSQL
whereENUM
types must have names. Enum values are ordered by ordinal.- Since:
- 6.5
- See Also:
PostgreSQLEnumJdbcType
, Constant Field Values
-
VECTOR
public static final int VECTOR
A type code representing anembedding vector
type for databases likePostgreSQL
that have special extensions. An embedding vector essentially is afloat[]
with a fixed size.- Since:
- 6.4
- See Also:
- Constant Field Values
-
-
Method Detail
-
isNumericType
public static boolean isNumericType(int typeCode)
Does the given JDBC type code represent some sort of numeric type?- Parameters:
typeCode
- a JDBC type code fromTypes
-
isStringType
public static boolean isStringType(int typeCode)
Is this a type with a length, that is, is it some kind of character string or binary string?- Parameters:
typeCode
- a JDBC type code fromTypes
-
isCharacterOrClobType
public static boolean isCharacterOrClobType(int typeCode)
Does the given JDBC type code represent some sort of character string type?- Parameters:
typeCode
- a JDBC type code fromTypes
-
isCharacterType
public static boolean isCharacterType(int typeCode)
Does the given JDBC type code represent some sort of character string type?- Parameters:
typeCode
- a JDBC type code fromTypes
-
isVarcharType
public static boolean isVarcharType(int typeCode)
Does the given JDBC type code represent some sort of variable-length character string type?- Parameters:
typeCode
- a JDBC type code fromTypes
-
isVarbinaryType
public static boolean isVarbinaryType(int typeCode)
Does the given JDBC type code represent some sort of variable-length binary string type?- Parameters:
typeCode
- a JDBC type code fromTypes
-
isBinaryType
public static boolean isBinaryType(int typeCode)
Does the given JDBC type code represent some sort of variable-length binary string or BLOB type?- Parameters:
typeCode
- a JDBC type code fromTypes
-
isNumericOrDecimal
public static boolean isNumericOrDecimal(int typeCode)
Does the given typecode represent one of the two SQL decimal types?- Parameters:
typeCode
- a JDBC type code fromTypes
-
isFloatOrRealOrDouble
public static boolean isFloatOrRealOrDouble(int typeCode)
Does the given typecode represent a SQL floating point type?- Parameters:
typeCode
- a JDBC type code fromTypes
-
isIntegral
public static boolean isIntegral(int typeCode)
Does the given typecode represent a SQL integer type?- Parameters:
typeCode
- a JDBC type code fromTypes
-
isSmallOrTinyInt
@Internal public static boolean isSmallOrTinyInt(int typeCode)
-
isTemporalType
public static boolean isTemporalType(int typeCode)
Does the given typecode represent a SQL date, time, or timestamp type?- Parameters:
typeCode
- a JDBC type code fromTypes
-
isIntervalType
public static boolean isIntervalType(int typeCode)
Does the given typecode represent a SQLinterval
type?
-
isDurationType
public static boolean isDurationType(int typeCode)
Does the given typecode represent aduration
type?
-
hasDatePart
public static boolean hasDatePart(int typeCode)
Does the given typecode represent a SQL date or timestamp type?- Parameters:
typeCode
- a JDBC type code fromTypes
-
hasTimePart
public static boolean hasTimePart(int typeCode)
Does the given typecode represent a SQL time or timestamp type?- Parameters:
typeCode
- a JDBC type code fromTypes
-
isSpatialType
public static boolean isSpatialType(int typeCode)
Does the typecode represent a spatial (Geometry or Geography) type.- Parameters:
typeCode
- - a JDBC type code
-
isEnumType
public static boolean isEnumType(int typeCode)
-
-