Class SqlTypes
- java.lang.Object
-
- org.hibernate.type.SqlTypes
-
-
Field Summary
Fields Modifier and Type Field Description static int
ARRAY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeARRAY
.static int
BIGINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeBIGINT
.static int
BINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeBINARY
.static int
BIT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeBIT
.static int
BLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeBLOB
.static int
BOOLEAN
The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL typeBOOLEAN
.static int
CHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeCHAR
.static int
CLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeCLOB
.static int
DATALINK
The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL typeDATALINK
.static int
DATE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeDATE
.static int
DECIMAL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeDECIMAL
.static int
DISTINCT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeDISTINCT
.static int
DOUBLE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeDOUBLE
.static int
FLOAT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeFLOAT
.static int
GEOGRAPHY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeGEOGRAPHY
.static int
GEOMETRY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeGEOMETRY
.static int
INET
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeINET
for IPv4 or IPv6 addresses.static int
INTEGER
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeINTEGER
.static int
INTERVAL_SECOND
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeINTERVAL SECOND
for a temporal amount in terms of seconds and fractional seconds.static int
JAVA_OBJECT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeJAVA_OBJECT
.static int
JSON
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeJSON
.static int
LONG32NVARCHAR
static int
LONG32VARBINARY
static int
LONG32VARCHAR
static int
LONGNVARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeLONGNVARCHAR
.static int
LONGVARBINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeLONGVARBINARY
.static int
LONGVARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeLONGVARCHAR
.static int
NCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeNCHAR
static int
NCLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeNCLOB
.static int
NULL
The constant in the Java programming language that identifies the generic SQL valueNULL
.static int
NUMERIC
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeNUMERIC
.static int
NVARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeNVARCHAR
.static int
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 methodsgetObject
andsetObject
.static int
POINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typePOINT
.static int
REAL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeREAL
.static int
REF
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeREF
.static int
REF_CURSOR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeREF CURSOR
.static int
ROWID
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeROWID
static int
SMALLINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeSMALLINT
.static int
SQLXML
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeXML
.static int
STRUCT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeSTRUCT
.static int
TIME
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTIME
.static int
TIME_WITH_TIMEZONE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTIME WITH TIMEZONE
.static int
TIMESTAMP
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTIMESTAMP
.static int
TIMESTAMP_UTC
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTIMESTAMP_UTC
.static int
TIMESTAMP_WITH_TIMEZONE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTIMESTAMP WITH TIMEZONE
.static int
TINYINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTINYINT
.static int
UUID
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeUUID
.static int
VARBINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeVARBINARY
.static int
VARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeVARCHAR
.
-
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
isCharacterOrClobType(int sqlType)
Does the given JDBC type code represent some sort of character string type?static boolean
isCharacterType(int sqlType)
Does the given JDBC type code represent some sort of character string type?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
isNumericOrDecimal(int typeCode)
Does the given typecode represent one of the two SQL decimal types?static boolean
isNumericType(int sqlType)
Does the given JDBC type code represent some sort of numeric type?static boolean
isTemporalType(int typeCode)
Does the given typecode represent a SQL date, time, or timestamp type?static boolean
isVarbinaryType(int sqlType)
Does the given JDBC type code represent some sort of variable-length binary string type?static boolean
isVarcharType(int sqlType)
Does the given JDBC type code represent some sort of variable-length character string type?
-
-
-
Field Detail
-
BIT
public static final int BIT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
BIT
.- See Also:
Types.BIT
, Constant Field Values
-
TINYINT
public static final int TINYINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
TINYINT
.- See Also:
Types.TINYINT
, Constant Field Values
-
SMALLINT
public static final int SMALLINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
SMALLINT
.- See Also:
Types.SMALLINT
, Constant Field Values
-
INTEGER
public static final int INTEGER
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
INTEGER
.- See Also:
Types.INTEGER
, Constant Field Values
-
BIGINT
public static final int BIGINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
BIGINT
.- See Also:
Types.BIGINT
, Constant Field Values
-
FLOAT
public static final int FLOAT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
FLOAT
.- See Also:
Types.FLOAT
, Constant Field Values
-
REAL
public static final int REAL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
REAL
.- See Also:
Types.REAL
, Constant Field Values
-
DOUBLE
public static final int DOUBLE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
DOUBLE
.- See Also:
Types.DOUBLE
, Constant Field Values
-
NUMERIC
public static final int NUMERIC
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
NUMERIC
.- See Also:
Types.NUMERIC
, Constant Field Values
-
DECIMAL
public static final int DECIMAL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
DECIMAL
.- See Also:
Types.DECIMAL
, Constant Field Values
-
CHAR
public static final int CHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
CHAR
.- See Also:
Types.CHAR
, Constant Field Values
-
VARCHAR
public static final int VARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
VARCHAR
.- See Also:
Types.VARCHAR
, Constant Field Values
-
LONGVARCHAR
public static final int LONGVARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
LONGVARCHAR
.Interpreted by Hibernate as a
VARCHAR
-like type large enough to hold a string of maximum lengthLength.LONG
.- See Also:
Length.LONG
,Types.LONGVARCHAR
, Constant Field Values
-
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.- See Also:
Length.LONG32
, Constant Field Values
-
DATE
public static final int DATE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
DATE
.- See Also:
Types.DATE
, Constant Field Values
-
TIME
public static final int TIME
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
TIME
.- See Also:
Types.TIME
, Constant Field Values
-
TIMESTAMP
public static final int TIMESTAMP
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
TIMESTAMP
.- See Also:
Types.TIMESTAMP
, Constant Field Values
-
BINARY
public static final int BINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
BINARY
.- See Also:
Types.BINARY
, Constant Field Values
-
VARBINARY
public static final int VARBINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
VARBINARY
.- See Also:
Types.VARBINARY
, Constant Field Values
-
LONGVARBINARY
public static final int LONGVARBINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type
LONGVARBINARY
.Interpreted by Hibernate as a
VARBINARY
-like type large enough to hold a byte array of maximum lengthLength.LONG
.- See Also:
Length.LONG
,Types.LONGVARBINARY
, Constant Field Values
-
LONG32VARBINARY
public static final int LONG32VARBINARY
A type code used internally by the HibernateDialect
to identify aVARBINARY
-like type large enough to hold any Java byte array.- See Also:
Length.LONG32
, Constant Field Values
-
NULL
public static final int NULL
The constant in the Java programming language that identifies the generic SQL value
NULL
.- See Also:
Types.NULL
, Constant Field Values
-
OTHER
public static final int 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 methodsgetObject
andsetObject
.- See Also:
Types.OTHER
, Constant Field Values
-
JAVA_OBJECT
public static final int JAVA_OBJECT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeJAVA_OBJECT
.- See Also:
Types.JAVA_OBJECT
, Constant Field Values
-
DISTINCT
public static final int DISTINCT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeDISTINCT
.- See Also:
Types.DISTINCT
, Constant Field Values
-
STRUCT
public static final int STRUCT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeSTRUCT
.- See Also:
Types.STRUCT
, Constant Field Values
-
ARRAY
public static final int ARRAY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeARRAY
.- See Also:
Types.ARRAY
, Constant Field Values
-
BLOB
public static final int BLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeBLOB
.- See Also:
Types.ARRAY
, Constant Field Values
-
CLOB
public static final int CLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeCLOB
.- See Also:
Types.CLOB
, Constant Field Values
-
REF
public static final int REF
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeREF
.- See Also:
Types.REF
, Constant Field Values
-
DATALINK
public static final int DATALINK
The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL typeDATALINK
.- See Also:
Types.DATALINK
, Constant Field Values
-
BOOLEAN
public static final int BOOLEAN
The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL typeBOOLEAN
.- See Also:
Types.BOOLEAN
, Constant Field Values
-
ROWID
public static final int ROWID
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeROWID
- See Also:
Types.ROWID
, Constant Field Values
-
NCHAR
public static final int NCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeNCHAR
- See Also:
Types.NCHAR
, Constant Field Values
-
NVARCHAR
public static final int NVARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeNVARCHAR
.- See Also:
Types.NVARCHAR
, Constant Field Values
-
LONGNVARCHAR
public static final int LONGNVARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeLONGNVARCHAR
.Interpreted by Hibernate as an
NVARCHAR
-like type large enough to hold a string of maximum lengthLength.LONG
.- See Also:
Length.LONG
,Types.LONGNVARCHAR
, Constant Field Values
-
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.- See Also:
Length.LONG32
, Constant Field Values
-
NCLOB
public static final int NCLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeNCLOB
.- See Also:
Types.NCLOB
, Constant Field Values
-
SQLXML
public static final int SQLXML
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeXML
.- See Also:
Types.SQLXML
, Constant Field Values
-
REF_CURSOR
public static final int REF_CURSOR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeREF CURSOR
.- See Also:
Types.REF_CURSOR
, Constant Field Values
-
TIME_WITH_TIMEZONE
public static final int TIME_WITH_TIMEZONE
The constant in the Java programming language, sometimes referred to as a type code, that 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
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTIMESTAMP WITH TIMEZONE
.
-
UUID
public static final int UUID
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeUUID
.
-
JSON
public static final int JSON
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeJSON
.- See Also:
- Constant Field Values
-
INET
public static final int INET
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeINET
for IPv4 or IPv6 addresses.- See Also:
- Constant Field Values
-
TIMESTAMP_UTC
public static final int TIMESTAMP_UTC
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTIMESTAMP_UTC
.- See Also:
- Constant Field Values
-
INTERVAL_SECOND
public static final int INTERVAL_SECOND
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeINTERVAL SECOND
for a temporal amount in terms of seconds and fractional seconds.- See Also:
- Constant Field Values
-
GEOMETRY
public static final int GEOMETRY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeGEOMETRY
.- See Also:
- Constant Field Values
-
POINT
public static final int POINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typePOINT
.- See Also:
- Constant Field Values
-
GEOGRAPHY
public static final int GEOGRAPHY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeGEOGRAPHY
.- Since:
- 6.0.1
- See Also:
- Constant Field Values
-
-
Method Detail
-
isNumericType
public static boolean isNumericType(int sqlType)
Does the given JDBC type code represent some sort of numeric type?- Parameters:
sqlType
- a JDBC type code fromTypes
-
isCharacterOrClobType
public static boolean isCharacterOrClobType(int sqlType)
Does the given JDBC type code represent some sort of character string type?- Parameters:
sqlType
- a JDBC type code fromTypes
-
isCharacterType
public static boolean isCharacterType(int sqlType)
Does the given JDBC type code represent some sort of character string type?- Parameters:
sqlType
- a JDBC type code fromTypes
-
isVarcharType
public static boolean isVarcharType(int sqlType)
Does the given JDBC type code represent some sort of variable-length character string type?- Parameters:
sqlType
- a JDBC type code fromTypes
-
isVarbinaryType
public static boolean isVarbinaryType(int sqlType)
Does the given JDBC type code represent some sort of variable-length binary string type?- Parameters:
sqlType
- 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
-
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
-
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
-
-