Class JdbcTypeNameMapper


  • public final class JdbcTypeNameMapper
    extends java.lang.Object
    (Badly named) helper for dealing with standard JDBC types as defined by Types
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getTypeName​(java.lang.Integer typeCode)
      Get the type name as in the static field names defined on Types.
      static boolean isStandardTypeCode​(int typeCode)
      Determine whether the given JDBC type code represents a standard JDBC type ("standard" being those defined on Types).
      static boolean isStandardTypeCode​(java.lang.Integer typeCode)
      Same as call to isStandardTypeCode(int)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isStandardTypeCode

        public static boolean isStandardTypeCode​(int typeCode)
        Determine whether the given JDBC type code represents a standard JDBC type ("standard" being those defined on Types). NOTE : Types.OTHER is also "filtered out" as being non-standard.
        Parameters:
        typeCode - The JDBC type code to check
        Returns:
        true to indicate the type code is a standard type code; false otherwise.
      • getTypeName

        public static java.lang.String getTypeName​(java.lang.Integer typeCode)
        Get the type name as in the static field names defined on Types. If a type code is not recognized, it is reported as UNKNOWN(?) where '?' is replace with the given type code. Intended as useful for logging purposes...
        Parameters:
        typeCode - The type code to find the name for.
        Returns:
        The type name.