Class SqlTypes
- java.lang.Object
-
- org.hibernate.type.SqlTypes
-
-
Field Summary
Fields Modifier and Type Field Description static intARRAYThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeARRAY.static intBIGINTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeBIGINT.static intBINARYThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeBINARY.static intBITThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeBIT.static intBLOBThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeBLOB.static intBOOLEANThe constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL typeBOOLEAN.static intCHARThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeCHAR.static intCLOBThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeCLOB.static intDATALINKThe constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL typeDATALINK.static intDATEThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeDATE.static intDECIMALThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeDECIMAL.static intDISTINCTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeDISTINCT.static intDOUBLEThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeDOUBLE.static intFLOATThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeFLOAT.static intGEOGRAPHYThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeGEOGRAPHY.static intGEOMETRYThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeGEOMETRY.static intINETThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeINETfor IPv4 or IPv6 addresses.static intINTEGERThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeINTEGER.static intINTERVAL_SECONDThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeINTERVAL SECONDfor a temporal amount in terms of seconds and fractional seconds.static intJAVA_OBJECTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeJAVA_OBJECT.static intJSONThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeJSON.static intLONG32NVARCHARstatic intLONG32VARBINARYstatic intLONG32VARCHARstatic intLONGNVARCHARThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeLONGNVARCHAR.static intLONGVARBINARYThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeLONGVARBINARY.static intLONGVARCHARThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeLONGVARCHAR.static intNCHARThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeNCHARstatic intNCLOBThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeNCLOB.static intNULLThe constant in the Java programming language that identifies the generic SQL valueNULL.static intNUMERICThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeNUMERIC.static intNVARCHARThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeNVARCHAR.static intOTHERThe 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 methodsgetObjectandsetObject.static intPOINTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typePOINT.static intREALThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeREAL.static intREFThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeREF.static intREF_CURSORThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeREF CURSOR.static intROWIDThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeROWIDstatic intSMALLINTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeSMALLINT.static intSQLXMLThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeXML.static intSTRUCTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeSTRUCT.static intTIMEThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTIME.static intTIME_WITH_TIMEZONEThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTIME WITH TIMEZONE.static intTIMESTAMPThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTIMESTAMP.static intTIMESTAMP_UTCThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTIMESTAMP_UTC.static intTIMESTAMP_WITH_TIMEZONEThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTIMESTAMP WITH TIMEZONE.static intTINYINTThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeTINYINT.static intUUIDThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeUUID.static intVARBINARYThe constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL typeVARBINARY.static intVARCHARThe 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 booleanhasDatePart(int typeCode)Does the given typecode represent a SQL date or timestamp type?static booleanhasTimePart(int typeCode)Does the given typecode represent a SQL time or timestamp type?static booleanisCharacterOrClobType(int sqlType)Does the given JDBC type code represent some sort of character string type?static booleanisCharacterType(int sqlType)Does the given JDBC type code represent some sort of character string type?static booleanisFloatOrRealOrDouble(int typeCode)Does the given typecode represent a SQL floating point type?static booleanisIntegral(int typeCode)Does the given typecode represent a SQL integer type?static booleanisNumericOrDecimal(int typeCode)Does the given typecode represent one of the two SQL decimal types?static booleanisNumericType(int sqlType)Does the given JDBC type code represent some sort of numeric type?static booleanisTemporalType(int typeCode)Does the given typecode represent a SQL date, time, or timestamp type?static booleanisVarbinaryType(int sqlType)Does the given JDBC type code represent some sort of variable-length binary string type?static booleanisVarcharType(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 HibernateDialectto 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 HibernateDialectto 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 methodsgetObjectandsetObject.- 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 HibernateDialectto 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 typeINETfor 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 SECONDfor 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
-
-