Package org.hibernate.type.descriptor
Class JdbcTypeNameMapper
java.lang.Object
org.hibernate.type.descriptor.JdbcTypeNameMapper
(Badly named) helper for dealing with standard JDBC types as defined by
Types-
Method Summary
Modifier and TypeMethodDescriptionstatic IntegergetTypeCode(String typeName) Get the type code as in the static field names defined onTypes.static StringgetTypeName(Integer typeCode) Get the type name as in the static field names defined onTypes.static booleanisStandardTypeCode(int typeCode) Determine whether the given JDBC type code represents a standard JDBC type ("standard" being those defined onTypes).static booleanisStandardTypeCode(Integer typeCode) Same as call toisStandardTypeCode(int)
-
Method Details
-
isStandardTypeCode
public static boolean isStandardTypeCode(int typeCode) Determine whether the given JDBC type code represents a standard JDBC type ("standard" being those defined onTypes).- Parameters:
typeCode- The JDBC type code to check- Returns:
trueto indicate the type code is a standard type code;falseotherwise.- Implementation Note:
Types.OTHERis also "filtered out" as being non-standard.
-
isStandardTypeCode
Same as call toisStandardTypeCode(int)- See Also:
-
getTypeName
Get the type name as in the static field names defined onTypes. If a type code is not recognized, it is reported asUNKNOWN(?)where '?' is replaced with the given type code.- Parameters:
typeCode- The type code to find the name for.- Returns:
- The type name.
- API Note:
- Useful for logging.
-
getTypeCode
Get the type code as in the static field names defined onTypes. If a type name is not recognized,nullis returned.- Parameters:
typeName- The type name to find the code for.- Returns:
- The type code.
-