Package org.hibernate.engine.jdbc.spi
Enum Class TypeNullability
- All Implemented Interfaces:
Serializable
,Comparable<TypeNullability>
,Constable
Describes the intrinsic nullability of a data type as reported by the JDBC driver.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe data type cannot accept nullsThe data type can accept nullsIt is unknown if the data type accepts nulls -
Method Summary
Modifier and TypeMethodDescriptionstatic TypeNullability
interpret
(short code) Based on the code retrieved fromDatabaseMetaData.getTypeInfo()
for theNULLABLE
column, return the appropriate enum.static TypeNullability
Returns the enum constant of this class with the specified name.static TypeNullability[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NULLABLE
The data type can accept nulls- See Also:
-
NON_NULLABLE
The data type cannot accept nulls- See Also:
-
UNKNOWN
It is unknown if the data type accepts nulls- See Also:
-
-
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
-
interpret
Based on the code retrieved fromDatabaseMetaData.getTypeInfo()
for theNULLABLE
column, return the appropriate enum.- Parameters:
code
- The retrieved code value.- Returns:
- The corresponding enum.
-