Class TypeMapper


  • public final class TypeMapper
    extends java.lang.Object
    May jdbc type to java type
    Version:
    $Id: TypeMapper.java,v 1.2 2004/08/26 12:33:18 thlee Exp $ $Name: $
    Author:
    TiongHiang Lee (thlee@onemindsoft.org)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Map CLASS_TO_TYPE_MAP
      map the java classes to jdbc type int *
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private TypeMapper()
      Constructor
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isJdbcType​(java.lang.Class c)
      Return whether a java type is a jdbc type
      static int toJdbcType​(java.lang.Class c)
      Return the jdbc type given the java type (based on JDBC spec)
      • Methods inherited from class java.lang.Object

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

      • CLASS_TO_TYPE_MAP

        public static final java.util.Map CLASS_TO_TYPE_MAP
        map the java classes to jdbc type int *
    • Constructor Detail

      • TypeMapper

        private TypeMapper()
        Constructor
    • Method Detail

      • toJdbcType

        public static int toJdbcType​(java.lang.Class c)
        Return the jdbc type given the java type (based on JDBC spec)
        Parameters:
        c - the java class
        Returns:
        the jdbc type
      • isJdbcType

        public static boolean isJdbcType​(java.lang.Class c)
        Return whether a java type is a jdbc type
        Parameters:
        c - the class
        Returns:
        true if it's jdbc type